Decode the SQL query logged by the Postgresql backend
This makes it easier to copy and paste the query when debugging.
This commit is contained in:
@@ -70,7 +70,7 @@ def replace_special_values(s, **mapping):
|
||||
class LoggingCursor(cursor):
|
||||
def execute(self, sql, args=None):
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.debug(self.mogrify(sql, args))
|
||||
logger.debug('query: %s', self.mogrify(sql, args).decode())
|
||||
cursor.execute(self, sql, args)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user