mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-25 13:10:32 +03:00
parent
3c58e96e10
commit
611c610041
|
@ -33,7 +33,7 @@ name should be escaped using `~psycopg2.extensions.quote_ident()`::
|
||||||
# This works, but it is not optimal
|
# This works, but it is not optimal
|
||||||
table_name = 'my_table'
|
table_name = 'my_table'
|
||||||
cur.execute(
|
cur.execute(
|
||||||
"insert into %s values (%%s, %%s)" % ext.quote_ident(table_name),
|
"insert into %s values (%%s, %%s)" % ext.quote_ident(table_name, cur),
|
||||||
[10, 20])
|
[10, 20])
|
||||||
|
|
||||||
This is now safe, but it somewhat ad-hoc. In case, for some reason, it is
|
This is now safe, but it somewhat ad-hoc. In case, for some reason, it is
|
||||||
|
|
Loading…
Reference in New Issue
Block a user