Re: Re: Inconsistency between JDBC and ODBC drivers when dealing with TIMESTAMP WITH TIME ZONE - Mailing list pgsql-odbc

From Walter Couto
Subject Re: Re: Inconsistency between JDBC and ODBC drivers when dealing with TIMESTAMP WITH TIME ZONE
Date
Msg-id 55ricaqbb5ifoardru24428g.1402701657114@email.android.com
Whole thread Raw
In response to Re: Re: Inconsistency between JDBC and ODBC drivers when dealing with TIMESTAMP WITH TIME ZONE  (Hiroshi Inoue <inoue@tpf.co.jp>)
List pgsql-odbc
I vote to leave the timestamp in the server's time zone. Maybe a driver option can be added in future to allow the user to choose between local and server.

On the string format, Microsoft has timestamp with timezone formats and old drivers or the new ones when you ask for the string will gives you the time zone in hh:mm. Teradata, Oracle and DB2 also return this format if the result is a string. I believe they all also clip the timezone (don't convert to local timezone) if you as for it as a SQL_TIMESTAMP. 

Walter


-------- Original message --------
From: Hiroshi Inoue
Date:06/13/2014 6:09 PM (GMT-05:00)
To: Walter Couto
Cc: David Johnston ,Adrian Klaver ,pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Re: Inconsistency between JDBC and ODBC drivers when dealing with TIMESTAMP WITH TIME ZONE

Hi Walter and all,

While reading the old and disabled code, I remembered the circumstances
back then a little.
Psqlodbc had followed the formatting rule e.g. described at the last
line in
  http://msdn.microsoft.com/en-us/library/ms712387%28v=vs.85%29.aspx
.
Also look at
  http://msdn.microsoft.com/en-us/library/ms712360%28v=vs.85%29.aspx
.
There's no time zone in ODBC world and I'm afraid the possibility
that some applications are broken by adding time zone expression.

So please vote which way to choose?

1. Keep the current behavior, i.e. simply drop the time zone part
    from server's output if exists.
2. Use local time zone instead of server time zone but omit the time
    zone expression.
3. Use local time zone with the time zone expression when the data
    type is TIMESTAMP WITH TIME ZONE.
4. The others.

Anyway I attached a patch which implements the above 3.
It's easy to change to 2.

regarts,
Hiroshi Inoue

> Walter
>
>
> -------- Original message --------
> From: "Inoue, Hiroshi"
> Date:06/10/2014 11:39 PM (GMT-05:00)
> To: Walter Couto ,David Johnston
> Cc: Adrian Klaver ,pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Re: Inconsistency between JDBC and ODBC drivers when
> dealing with TIMESTAMP WITH TIME ZONE
>
> Hi Walter,
>
> I would enable time zone related code and complete the coding.
> When I make a patch, could you test it?


CONFIDENTIALITY NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.   ­­  

pgsql-odbc by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: Re: Inconsistency between JDBC and ODBC drivers when dealing with TIMESTAMP WITH TIME ZONE
Next
From: Craig Ringer
Date:
Subject: Re: NPE in psqlodbc30a.dll!PgDtc_set_property caused by pgendlista.dll!IAsyncPG::RequestExec