Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #12766 -- Only set the psycopg1 client encoding when the connec…

…tion is first created. This allows the custom_pk test to pass under psycopg1.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 59a7ca9f18bd9d31d1b784a1de2fa3a86de0db70 1 parent ef8d351
@freakboy3742 freakboy3742 authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 django/db/backends/postgresql/
5 django/db/backends/postgresql/
@@ -146,9 +146,8 @@ def _cursor(self):
if self._version[0:2] < (8, 0):
# 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
+ cursor.execute("SET client_encoding to 'UNICODE'")
+ return UnicodeCursorWrapper(cursor, 'utf-8')
def typecast_string(s):
Please sign in to comment.
Something went wrong with that request. Please try again.