/[gnue]/gnue-common/src/datasources/drivers/postgresql/Base/Connection.py
ViewVC logotype

Diff of /gnue-common/src/datasources/drivers/postgresql/Base/Connection.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.2 by siesel, Fri Oct 10 12:18:50 2003 UTC revision 1.1.2.3 by jcater, Sat Nov 8 16:14:57 2003 UTC
# Line 85  class Connection(DBSIG2.Connection): Line 85  class Connection(DBSIG2.Connection):
85    
86    def connect(self                                                                                                                                                                                                                                          , connectData={}):    def connect(self                                                                                                                                                                                                                                          , connectData={}):
87    
88        print "Postgresql database driver initializing"
89        
90      if not hasattr(self,'_DatabaseError'):      if not hasattr(self,'_DatabaseError'):
91        self._DatabaseError = self._pg_driver.DatabaseError        self._DatabaseError = self._pg_driver.DatabaseError
92    
# Line 127  class Connection(DBSIG2.Connection): Line 129  class Connection(DBSIG2.Connection):
129        if self._pg_encoding not in ("",'DEFAULT'):        if self._pg_encoding not in ("",'DEFAULT'):
130          GDebug.printMesg(1,'Setting postgresql client_encoding to %s (%s)' % (self._pg_encoding,          GDebug.printMesg(1,'Setting postgresql client_encoding to %s (%s)' % (self._pg_encoding,
131                                                                                self._encoding))                                                                                self._encoding))
132          cursor = self._dataConnection.cursor()          cursor = self.native.cursor()
133          cursor.execute("SET CLIENT_ENCODING TO '%s'" % self._pg_encoding)          cursor.execute("SET CLIENT_ENCODING TO '%s'" % self._pg_encoding)
134          cursor.close()          cursor.close()
135    

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26