Closed ecederstrand closed 5 years ago
It would fail in different scenarios. The right thing to do is to %%
the %
.
This makes me thing that if any the sql.Identifier
should do the same. However that would be a different bug. This is not a bug in psycopg but in your query: you have to fix it. You would have the same problem with a normal cursor.execute()
.
This came up trying to call
execute_values()
with a column name that has special characters:Possibly
_split_sql
should do the tokenizing from the back instead?