Commit 93b5eddd authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

[1.1.X] Fixed #12766 -- Only set the psycopg1 client encoding when the...

[1.1.X] Fixed #12766 -- Only set the psycopg1 client encoding when the connection is first created. This allows the custom_pk test to pass under psycopg1.

Backport of r12848 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent b74e6c35
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -128,8 +128,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
                # No savepoint support for earlier version of PostgreSQL.
                self.features.uses_savepoints = False
            cursor.execute("SET client_encoding to 'UNICODE'")
        cursor = UnicodeCursorWrapper(cursor, 'utf-8')
        return cursor
        return UnicodeCursorWrapper(cursor, 'utf-8')

def typecast_string(s):
    """