Django

Code

Changeset 4972

Show
Ignore:
Timestamp:
04/09/07 06:05:50 (2 years ago)
Author:
mtredinnick
Message:

unicode: Removed stray reference to non-existent settings.DATABASE_CHARSET.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/unicode/django/db/backends/postgresql/base.py

    r4971 r4972  
    8484        if set_tz: 
    8585            cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE]) 
    86         if not settings.DATABASE_CHARSET: 
    87             cursor.execute("SHOW client_encoding") 
    88             encoding = ENCODING_MAP[cursor.fetchone()[0]] 
    89         else: 
    90             encoding = settings.DATABASE_CHARSET 
     86        cursor.execute("SHOW client_encoding") 
     87        encoding = ENCODING_MAP[cursor.fetchone()[0]] 
    9188        cursor = UnicodeCursorWrapper(cursor, encoding) 
    9289        global client_encoding 
     
    9491            # We assume the client encoding isn't going to change for random 
    9592            # reasons. 
     93            Database.register_type(Database.new_type(Database.types[1043].values, 'STRING', typecast_string)) 
    9694            client_encoding = encoding 
    9795        global postgres_version 
     
    269267Database.register_type(Database.new_type((1114,1184), "TIMESTAMP", util.typecast_timestamp)) 
    270268Database.register_type(Database.new_type((16,), "BOOLEAN", util.typecast_boolean)) 
    271 Database.register_type(Database.new_type(Database.types[1043].values, 'STRING', typecast_string)) 
    272269 
    273270OPERATOR_MAPPING = {