[Checkins] SVN: relstorage/trunk/relstorage/adapters/ We are no longer using Unicode in the database, so don't pay the price

Shane Hathaway shane at hathawaymix.org
Wed Oct 1 15:29:38 EDT 2008


Log message for revision 91653:
  We are no longer using Unicode in the database, so don't pay the price

Changed:
  U   relstorage/trunk/relstorage/adapters/mysql.py
  U   relstorage/trunk/relstorage/adapters/postgresql.py

-=-
Modified: relstorage/trunk/relstorage/adapters/mysql.py
===================================================================
--- relstorage/trunk/relstorage/adapters/mysql.py	2008-10-01 19:25:47 UTC (rev 91652)
+++ relstorage/trunk/relstorage/adapters/mysql.py	2008-10-01 19:29:37 UTC (rev 91653)
@@ -81,8 +81,6 @@
 
     def __init__(self, **params):
         self._params = params.copy()
-        self._params['use_unicode'] = True
-        self._params['charset'] = 'utf8'
 
     def create_schema(self, cursor):
         """Create the database tables."""

Modified: relstorage/trunk/relstorage/adapters/postgresql.py
===================================================================
--- relstorage/trunk/relstorage/adapters/postgresql.py	2008-10-01 19:25:47 UTC (rev 91652)
+++ relstorage/trunk/relstorage/adapters/postgresql.py	2008-10-01 19:29:37 UTC (rev 91653)
@@ -23,9 +23,7 @@
 
 log = logging.getLogger("relstorage.adapters.postgresql")
 
-psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
 
-
 class PostgreSQLAdapter(Adapter):
     """PostgreSQL adapter for RelStorage."""
 
@@ -191,7 +189,6 @@
         """Open a database connection and return (conn, cursor)."""
         try:
             conn = psycopg2.connect(self._dsn)
-            conn.set_client_encoding('UNICODE')
             conn.set_isolation_level(isolation)
             cursor = conn.cursor()
             cursor.arraysize = 64



More information about the Checkins mailing list