Re: Regression: Problems with Timestamp arguments

From: Lachezar Dobrev <l(dot)dobrev(at)gmail(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Regression: Problems with Timestamp arguments
Date: 2013-09-11 07:06:02
Message-ID: CA+xsaB2DKMm40EeRsVw17BvbscN=Cizo8M1k4EiwetYB7fMqrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

You're technically correct.

Maybe this can be applied to NULL arguments only? Would that be
'more' acceptable?
Lately I've been proven wrong with many of my (reasonable)
expectations, but I *hope* NULL timestamps with or without time zones
are the same!

2013/9/11 Kris Jurka <books(at)ejurka(dot)com>:
>
>
> On Tue, 10 Sep 2013, Lachezar Dobrev wrote:
>
>> I've made a blunt stab at working around the issue.
>> The attached patch adds a new parameter to the JDBC URL: timestamp.
>> The parameter can be wither 'with_timezone' or 'without_timezone'. If
>> the parameter is missing, or has a different value then the current
>> behaviour (using Oid.UNSPECIFIED) is exhibited. With the parameters
>> specified correctly one of the Oid.TIMESTAMP or Oid.TIMESTAMPTZ is
>> used when sending Timestamp arguments to the server.
>
> This won't really work in general though. If you have a database that has
> both timestamp and timestamptz fields in it, there is no valid setting of
> this configuration option. Setting it either way will result in silent
> corruption of your data.
>
> Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Lachezar Dobrev 2013-09-11 07:12:39 Re: Regression: Problems with Timestamp arguments
Previous Message Kris Jurka 2013-09-11 06:37:03 Re: Regression: Problems with Timestamp arguments