From e5adc5a42797a7afe078320d3050a300b11f8405 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Mon, 9 Apr 2007 11:05:50 +0000 Subject: [PATCH] unicode: Removed stray reference to non-existent settings.DATABASE_CHARSET. git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@4972 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/postgresql/base.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index f0ef70f47b..de634f345d 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -83,16 +83,14 @@ class DatabaseWrapper(local): cursor = self.connection.cursor() if set_tz: cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE]) - if not settings.DATABASE_CHARSET: - cursor.execute("SHOW client_encoding") - encoding = ENCODING_MAP[cursor.fetchone()[0]] - else: - encoding = settings.DATABASE_CHARSET + cursor.execute("SHOW client_encoding") + encoding = ENCODING_MAP[cursor.fetchone()[0]] cursor = UnicodeCursorWrapper(cursor, encoding) global client_encoding if not client_encoding: # We assume the client encoding isn't going to change for random # reasons. + Database.register_type(Database.new_type(Database.types[1043].values, 'STRING', typecast_string)) client_encoding = encoding global postgres_version if not postgres_version: @@ -268,7 +266,6 @@ except AttributeError: Database.register_type(Database.new_type((1083,1266), "TIME", util.typecast_time)) Database.register_type(Database.new_type((1114,1184), "TIMESTAMP", util.typecast_timestamp)) Database.register_type(Database.new_type((16,), "BOOLEAN", util.typecast_boolean)) -Database.register_type(Database.new_type(Database.types[1043].values, 'STRING', typecast_string)) OPERATOR_MAPPING = { 'exact': '= %s',