Skip to content

Allow-list pragma_table_info(tablename) and similar #761

@simonw

Description

@simonw

It would be great if pragma_table_info(tablename) was allowed to be used in queries. See also https://github.com/simonw/til/blob/master/sqlite/list-all-columns-in-a-database.md

select * from pragma_table_info(tablename); is currently disallowed for user-provided queries via a regex restriction - but could help here too.

disallawed_sql_res = [(re.compile("pragma"), "Statement may not contain PRAGMA")]

Originally posted by @simonw in #760 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions