comparison DBInterface.py @ 16:5b99c04c567c

fix for psycopg 2.4 Column type.
author casties
date Wed, 22 Feb 2012 18:53:05 +0100
parents 22c16a632909
children 60fea3a6c695
comparison
equal deleted inserted replaced
15:9fb0d4f24486 16:5b99c04c567c
169 args = (args,) 169 args = (args,)
170 170
171 cur.execute(query, args) 171 cur.execute(query, args)
172 # description of returned fields 172 # description of returned fields
173 fields = cur.description 173 fields = cur.description
174 logging.debug("fields: %s"%repr(fields))
175 if len(fields) > 0:
176 # re-pack Column object in tuple
177 fields = (f[0:] for f in fields)
178 logging.debug("re-packed fields: %s"%repr(fields))
179
174 if hasResult: 180 if hasResult:
175 # get all data in an array 181 # get all data in an array
176 data = cur.fetchall() 182 data = cur.fetchall()
177 cur.close() 183 cur.close()
178 #logging.debug("fields: %s"%repr(fields)) 184 #logging.debug("fields: %s"%repr(fields))