Re: PreparedStatement.setDate() behavior with OVERLAPS

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher BROWN <brown(at)reflexe(dot)fr>, List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: PreparedStatement.setDate() behavior with OVERLAPS
Date: 2015-08-11 15:03:09
Message-ID: CADK3HH+kxuK+zJvLMf4Mm111f6gbA=eL0X5pRL_Z+HF+tUi_Uw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 11 August 2015 at 11:00, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Dave Cramer <pg(at)fastcrypt(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vladimir Sitnikov 2015-08-11 17:22:36 Re: PreparedStatement.setDate() behavior with OVERLAPS
Previous Message Tom Lane 2015-08-11 15:00:09 Re: PreparedStatement.setDate() behavior with OVERLAPS