pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ludek Finstrle <luf@pzkagis.cz>
To: pgsql-odbc@postgresql.org
Subject: Re: [ psqlodbc-Bugs-1000476 ] DateStyle and Transaction
Date: Fri, 9 Dec 2005 03:28:21 +0100
Message-ID: <20051209022821.GA8563@soptik.pzkagis.cz> (raw)
In-Reply-To: <20051208154341.BFB28112504F@pgfoundry.org>
References: <20051208154341.BFB28112504F@pgfoundry.org>

> 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

Attachments:

psqlodbc-autocommit_off.diff (text/plain, 466B) download 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;

view thread (17+ messages)  latest in thread

Message-ID: <20051209022821.GA8563@soptik.pzkagis.cz>
Permalink:  ../20051209022821.GA8563@soptik.pzkagis.cz/
Also on:    postgresql.org/message-id/20051209022821.GA8563@soptik.pzkagis.cz

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: luf@pzkagis.cz
  Subject: Re: [ psqlodbc-Bugs-1000476 ] DateStyle and Transaction
  In-Reply-To: <20051209022821.GA8563@soptik.pzkagis.cz>
  References: <20051208154341.BFB28112504F@pgfoundry.org> <20051209022821.GA8563@soptik.pzkagis.cz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox