Bugs item #2923972, was opened at 2009-12-30 19:51
Message generated for change (Tracker Item Submitted) made by dvkeeney
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2923972&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Postgres
Group: SQLObject release (specify)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: dkeeney (dvkeeney)
Assigned to: Nobody/Anonymous (nobody)
Summary: query method on connection
Initial Comment:
In the end of makeConnection, in postgres/pg_connection.py, the method 'query' is called on the connection object.
The connection object has just been created using a call to one or another DB API constructors, and the DB API spec does not have a 'query' method. As far as I know, the psycopg2 implementation does not have such a method either.
I patched my copy by adding an hasattr call to verify the existence of 'query' method, but I suspect a better fix is to use method is .execute, so the end of makeConnection would be:
dbEncoding = self.dbEncoding
if dbEncoding: # and hasattr(conn,'query'):
conn.execute("SET client_encoding TO %s",dbEncoding)
return conn
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2923972&group_id=74338
|