Re: PreparedStatement.setDate() behavior with OVERLAPS - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: PreparedStatement.setDate() behavior with OVERLAPS
Date
Msg-id CADK3HH+kxuK+zJvLMf4Mm111f6gbA=eL0X5pRL_Z+HF+tUi_Uw@mail.gmail.com
Whole thread Raw
In response to Re: PreparedStatement.setDate() behavior with OVERLAPS  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PreparedStatement.setDate() behavior with OVERLAPS  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-jdbc

On 11 August 2015 at 11:00, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Dave Cramer <pg@fastcrypt.com> writes:
> Here are the comments in the code.
>   // We must use UNSPECIFIED here, or inserting a Date-with-timezone into a
>   // timestamptz field does an unexpected rotation by the server's TimeZone:

Ugh.  But why not send it as a timestamptz?

Unfortunately we do the same thing with times and timestamps. 
We don't parse the sql so we don't know if there is TZ information. 

If the underlying column is a timestamp and we set the oid to timstamptz then it fails. IIRC

pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: PreparedStatement.setDate() behavior with OVERLAPS
Next
From: Vladimir Sitnikov
Date:
Subject: Re: PreparedStatement.setDate() behavior with OVERLAPS