From b740534dc4c68a6b4d30eef96f4d7f70c17c9e0d Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 3 Feb 2010 07:31:00 +0000 Subject: [PATCH] Fixed a regression in the Postgres psycopg cursor handling introduced by r12352. Thanks to Kenneth Gonsalves for the report, and Karen for the fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12378 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/postgresql/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index 85b2acb9d2..5681311a65 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -54,7 +54,7 @@ class UnicodeCursorWrapper(object): def execute(self, sql, params=()): try: - return self.cursor.execute(sql, params) + return self.cursor.execute(smart_str(sql, self.charset), self.format_params(params)) except Database.IntegrityError, e: raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2] except Database.DatabaseError, e: