X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 7A1A69DCAE3 for ; Thu, 8 Dec 2005 22:28:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34626-08 for ; Thu, 8 Dec 2005 22:28:25 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp.pzkagis.cz (gis6.netbox.cz [83.240.30.214]) by postgresql.org (Postfix) with ESMTP id E83C49DCACB for ; Thu, 8 Dec 2005 22:28:18 -0400 (AST) Received: (from luf@localhost) by smtp.pzkagis.cz (8.11.6/8.11.6) id jB92SLE08606 for pgsql-odbc@postgresql.org; Fri, 9 Dec 2005 03:28:21 +0100 Date: Fri, 9 Dec 2005 03:28:21 +0100 From: Ludek Finstrle To: pgsql-odbc@postgresql.org Subject: Re: [ psqlodbc-Bugs-1000476 ] DateStyle and Transaction Message-ID: <20051209022821.GA8563@soptik.pzkagis.cz> References: <20051208154341.BFB28112504F@pgfoundry.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <20051208154341.BFB28112504F@pgfoundry.org> User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/98 X-Sequence-Number: 6577 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > In application, I've turned auto_commit mode off. > > P.S. The same thing we'll see if we cancel first select statement. > After cancellation there will be "ROLLBACK" command which drops > DateStyle setting too. What I think, driver should issue "COMMIT" > right after settings in connection procedure. For example, > call CC_commit() at the end of CC_send_settings() function. I thinks it's better to commit later in other place (e.g. commit set client_encoding too). Patch attached. Thanks for report and initial hint Luf --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="psqlodbc-autocommit_off.diff" diff -c psqlodbc.orig\connection.c psqlodbc\connection.c *** psqlodbc.orig\connection.c Sun Dec 04 22:16:28 2005 --- psqlodbc\connection.c Fri Dec 09 03:58:42 2005 *************** *** 1343,1348 **** --- 1343,1351 ---- ci->updatable_cursors = ci->allow_keyset; #endif /* DRIVER_CURSOR_IMPLEMENT */ + if (!CC_is_in_autocommit(self)) + CC_commit(self); + CC_clear_error(self); /* clear any initial command errors */ self->status = CONN_CONNECTED; --+HP7ph2BbKc20aGI--