From be55d5f76a1d4cb8ffb0913d270770f3ca90e7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Feb 2009 15:34:03 +0100 Subject: [PATCH] Use cursor query to display wrong SQL --- trytond/backend/postgresql/database.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/trytond/backend/postgresql/database.py b/trytond/backend/postgresql/database.py index ed1f11eb95..6462780022 100644 --- a/trytond/backend/postgresql/database.py +++ b/trytond/backend/postgresql/database.py @@ -203,8 +203,7 @@ class Cursor(CursorInterface): res = self.cursor.execute(sql) except: logger = logging.getLogger('sql') - logger.error('Wrong SQL: ' + sql % tuple("'%s'" % unicode(x) - for x in params or [])) + logger.error('Wrong SQL: ' + self.cursor.query) raise if self.sql_log: res_from = RE_FROM.match(sql.lower())