commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/common/src/dbdrivers/_pgsql DBdriver.py


From: Jan Ischebeck
Subject: gnue/common/src/dbdrivers/_pgsql DBdriver.py
Date: Fri, 19 Jul 2002 09:22:40 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jan Ischebeck <address@hidden>  02/07/19 09:22:39

Modified files:
        common/src/dbdrivers/_pgsql: DBdriver.py 

Log message:
        use connectData and gConfig to determine database encoding now.
        (fix appserver doesn't work with postgres bug)

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/_pgsql/DBdriver.py.diff?tr1=1.20&tr2=1.21&r1=text&r2=text

Patches:
Index: gnue/common/src/dbdrivers/_pgsql/DBdriver.py
diff -c gnue/common/src/dbdrivers/_pgsql/DBdriver.py:1.20 
gnue/common/src/dbdrivers/_pgsql/DBdriver.py:1.21
*** gnue/common/src/dbdrivers/_pgsql/DBdriver.py:1.20   Thu Jul 18 14:18:32 2002
--- gnue/common/src/dbdrivers/_pgsql/DBdriver.py        Fri Jul 19 09:22:39 2002
***************
*** 119,132 ****
        raise GDataObjects.LoginError, value
  
      try:
!       # encoding = connectData['encoding']
!       encoding = gConfig('encoding') # connectData['encoding'] causes 
exception
!       GDebug.printMesg(1,'Setting postgresql client_encoding to %s' % 
encoding)
!       cursor = self._dataConnection.cursor()
!       cursor.execute("SET CLIENT_ENCODING TO '%s'" % encoding)
!       cursor.close()
!     except KeyError:
!       pass
      except self._DatabaseError: 
        try: 
          cursor.close()
--- 119,139 ----
        raise GDataObjects.LoginError, value
  
      try:
!       encoding = ""
!       try:
!         encoding = connectData['encoding']
!       except KeyError:
!         # if encoding is not defined in connectData use gnue.conf setting 
instead
!         try:
!           encoding = gConfig('encoding')
!         except:
!           pass 
!       if encoding!="":
!         
!         GDebug.printMesg(1,'Setting postgresql client_encoding to %s' % 
encoding)
!         cursor = self._dataConnection.cursor()
!         cursor.execute("SET CLIENT_ENCODING TO '%s'" % encoding)
!         cursor.close()
      except self._DatabaseError: 
        try: 
          cursor.close()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]