Thread: [SQL-CVS] r4068 - in SQLObject/trunk: docs sqlobject/postgres
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2010-01-06 15:46:34
|
Author: phd Date: 2010-01-06 08:46:27 -0700 (Wed, 06 Jan 2010) New Revision: 4068 Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/sqlobject/postgres/pgconnection.py Log: Merged a bugfix in PostgresConnection from revision 4067. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2010-01-06 15:44:05 UTC (rev 4067) +++ SQLObject/trunk/docs/News.txt 2010-01-06 15:46:27 UTC (rev 4068) @@ -13,7 +13,7 @@ SQLObject 0.12.1 ================ -* Fixed two bugs in PostgresConnection. +* Fixed three bugs in PostgresConnection. * A change ported from `SQLObject 0.11.3`_. Modified: SQLObject/trunk/sqlobject/postgres/pgconnection.py =================================================================== --- SQLObject/trunk/sqlobject/postgres/pgconnection.py 2010-01-06 15:44:05 UTC (rev 4067) +++ SQLObject/trunk/sqlobject/postgres/pgconnection.py 2010-01-06 15:46:27 UTC (rev 4068) @@ -131,12 +131,12 @@ # psycopg2 does not have an autocommit method. if hasattr(conn, 'autocommit'): conn.autocommit(1) + c = conn.cursor() if self.schema: - c = conn.cursor() c.execute("SET search_path TO " + self.schema) dbEncoding = self.dbEncoding if dbEncoding: - conn.query("SET client_encoding TO %s" % dbEncoding) + c.execute("SET client_encoding TO %s" % dbEncoding) return conn def _queryInsertID(self, conn, soInstance, id, names, values): |