In the pgdb module and the query_formatted() and higher level methods of the pg module such as update(), input parameters are adapted automatically, e.g. converting Python lists to PostgreSQL arrays.
However, the lower level query() and query_prepared() methods of the pg module pass parameters in raw form. This is not well documented, and there is no help on what to do in this case. We should explain how and when to manually adapt the parameters. Maybe also provide alternative low level methods with the Postgres parameter syntax or improve the low level methods so that they automatically adapt parameters as well if that's possible without loss of performance or backward compatibility.
(copied from Trac ticket 81, created 2019-06-07)
Reactions are currently unavailable
In the pgdb module and the query_formatted() and higher level methods of the pg module such as update(), input parameters are adapted automatically, e.g. converting Python lists to PostgreSQL arrays.
However, the lower level query() and query_prepared() methods of the pg module pass parameters in raw form. This is not well documented, and there is no help on what to do in this case. We should explain how and when to manually adapt the parameters. Maybe also provide alternative low level methods with the Postgres parameter syntax or improve the low level methods so that they automatically adapt parameters as well if that's possible without loss of performance or backward compatibility.
(copied from Trac ticket 81, created 2019-06-07)