Changeset 3499
- Timestamp:
- 05/20/09 07:06:13 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/pgstorage.py
r3489 r3499 58 58 repr(user))) 59 59 try : 60 self.database = pg. connect(host=host,61 62 63 64 60 self.database = pg.DB(host=host, 61 port=port, 62 dbname=dbname, 63 user=user, 64 passwd=passwd) 65 65 except PGError, msg : 66 66 msg = "%(msg)s --- the most probable cause of your problem is that PostgreSQL is down, or doesn't accept incoming connections because you didn't configure it as explained in PyKota's documentation." % locals() 67 67 raise PGError, msg 68 68 self.closed = False 69 try : 70 self.quote = self.database._quote 71 except AttributeError : # pg <v4.x 72 self.quote = pg._quote 69 73 try : 70 74 self.database.query("SET CLIENT_ENCODING TO 'UTF-8';") … … 137 141 else : 138 142 typ = "text" 139 return pg._quote(field, typ)143 return self.quote(field, typ) 140 144 141 145 def prepareRawResult(self, result) :