[ psqlodbc-Bugs-1000476 ] DateStyle and Transaction

From: <noreply(at)pgfoundry(dot)org>
To: noreply(at)pgfoundry(dot)org
Subject: [ psqlodbc-Bugs-1000476 ] DateStyle and Transaction
Date: 2005-12-20 15:05:50
Message-ID: 20051220150550.9A849112507B@pgfoundry.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Bugs item #1000476, was opened at 2005-12-08 16:43
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000476&group_id=1000125

Category: None
Group: None
>Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: Nobody (None)
Assigned to: Ludek Finstrle (luf)
Summary: DateStyle and Transaction

Initial Comment:
When I work with auto_commit mode off, I can issue ODBC rollback command after my first statements. After that driver loses his DateStyle ISO setting which one driver setup at begin.
So, later it will return date fields in wrong format if my default database style is different then ISO (I'm using European,SQL format).
Here is example attached. Gzipped TAR archive includes mylog file and postgresql log file.

I'm using Linux with unixODBC 2.2.9, psqlodbc 08.01.0102 with options "Threading=0, UseDeclareFetch=1". 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.

----------------------------------------------------------------------

>Comment By: Ludek Finstrle (luf)
Date: 2005-12-20 16:05

Message:
Reporter wrote to pgsql-odbc mailing list:

I've tried this version from development snapshot.

* 1000476. DateStyle issue is working fine. In both modes of
auto_commit. Because there was "COMMIT" right after "select
pg_client_encoding()". So, my first statement was started from "BEGIN",
and DateStyle setting was committed.

Bug is fixed

----------------------------------------------------------------------

Comment By: Dave Page (dpage)
Date: 2005-12-10 17:17

Message:
Bug re-opened - Luf pointed out some ongoing discussion about whether the fix is 100% right or not.

http://archives.postgresql.org/pgsql-odbc/2005-12/msg00114.php

----------------------------------------------------------------------

Comment By: Dave Page (dpage)
Date: 2005-12-09 23:59

Message:
Patch applied, thanks.

----------------------------------------------------------------------

Comment By: Ludek Finstrle (luf)
Date: 2005-12-09 03:35

Message:
I fix the problem. Patch is attached. Please try it and report if it helps.

----------------------------------------------------------------------

You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000476&group_id=1000125

Browse pgsql-odbc by date

  From Date Subject
Next Message Ludek Finstrle 2005-12-20 15:10:17 Re: 08.01.0105 release and Cancel issues
Previous Message noreply 2005-12-20 15:04:05 [ psqlodbc-Bugs-1000457 ] Autocommit and Cancel