I want to safely insert a SQL identifier, e.g. a role name, into a query.
Binding values does not work for that (ref /a/15902962/4828720)
psycopg provides its own classes, e.g. SQL.Identifier
for this kind of stuff. Does Qt also provide a safe, built-in way to do this?
role = "test_user"
statement_template = "SET ROLE {role};"
query = QSqlQuery()
# How to safely insert the role for the query?