Fix query mogrify issue.
parent
9b7a38ac52
commit
c35d449d7e
|
@ -1017,7 +1017,6 @@ WHERE db.datname = current_database()""")
|
||||||
encoding = self.python_encoding
|
encoding = self.python_encoding
|
||||||
|
|
||||||
query = query.encode(encoding)
|
query = query.encode(encoding)
|
||||||
|
|
||||||
self.__async_cursor = cur
|
self.__async_cursor = cur
|
||||||
self.__async_query_id = query_id
|
self.__async_query_id = query_id
|
||||||
|
|
||||||
|
@ -1814,7 +1813,7 @@ Failed to reset the connection to the server due to following error:
|
||||||
else:
|
else:
|
||||||
|
|
||||||
if parameters:
|
if parameters:
|
||||||
return psycopg.sql.SQL(query.format(parameters)
|
with psycopg.ClientCursor(self.conn) as _cur:
|
||||||
).as_string(self.conn)
|
return _cur.mogrify(query, parameters)
|
||||||
else:
|
else:
|
||||||
return query
|
return query
|
||||||
|
|
Loading…
Reference in New Issue