-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
https://www.psycopg.org/docs/sql.html has this useful feature where tables, schemas, etc can be safely parametrized and added to a query.
query = sql.SQL("select {field} from {table} where {pkey} = %s").format(
field=sql.Identifier('my_name'),
table=sql.Identifier('some_table'),
pkey=sql.Identifier('id'))is this supported or on the roadmap?
I also asked the team working on https://github.com/qooleot/node-pg-query-template but I thought id mention it here as well.
https://stackoverflow.com/questions/62907228/sanitizing-user-inputs-when-the-user-input-is-a-schema-name-in-node-postgres provides a bit more background.