Commit 59a7ca9f authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Fixed #12766 -- Only set the psycopg1 client encoding when the connection is...

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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent ef8d351c
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -147,8 +147,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):
    """