pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Lachezar Dobrev <l.dobrev@gmail.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: Regression: Problems with Timestamp arguments
Date: Tue, 10 Sep 2013 18:37:04 -0400 (EDT)
Message-ID: <alpine.BSO.2.03.1309101834110.15199@ejurka.com> (raw)
In-Reply-To: <CA+xsaB3UxRJwUq0Kro1CEzuURUj9KkNV5bJfJO+qCDtn6vqReA@mail.gmail.com>
References: <CA+xsaB0EMDaNek0Oky9c17_8UX3-epWVP11+vTNgrAPoY2s9FA@mail.gmail.com>
	<CADK3HHLE=3ZMT5Qt+GTLUsAgq1LiFNdcqMqvw+ZqSb-rBTjF6w@mail.gmail.com>
	<CADK3HHJnRLVUaRA0PgsJ1TfF5Aq2oKot77eqy1uhF2rxUXPDJQ@mail.gmail.com>
	<CA+xsaB2MX7c-NeW7C_e_QcvAPCc8y03BZj4ML1GOOyeb4WwWDA@mail.gmail.com>
	<CA+xsaB3UxRJwUq0Kro1CEzuURUj9KkNV5bJfJO+qCDtn6vqReA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>



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


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (15+ messages)  latest in thread

Message-ID: <alpine.BSO.2.03.1309101834110.15199@ejurka.com>
Permalink:  ../alpine.BSO.2.03.1309101834110.15199@ejurka.com/
Also on:    postgresql.org/message-id/alpine.BSO.2.03.1309101834110.15199@ejurka.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, l.dobrev@gmail.com
  Subject: Re: Regression: Problems with Timestamp arguments
  In-Reply-To: <alpine.BSO.2.03.1309101834110.15199@ejurka.com>
  References: <CA+xsaB0EMDaNek0Oky9c17_8UX3-epWVP11+vTNgrAPoY2s9FA@mail.gmail.com> <CADK3HHLE=3ZMT5Qt+GTLUsAgq1LiFNdcqMqvw+ZqSb-rBTjF6w@mail.gmail.com> <CADK3HHJnRLVUaRA0PgsJ1TfF5Aq2oKot77eqy1uhF2rxUXPDJQ@mail.gmail.com> <CA+xsaB2MX7c-NeW7C_e_QcvAPCc8y03BZj4ML1GOOyeb4WwWDA@mail.gmail.com> <CA+xsaB3UxRJwUq0Kro1CEzuURUj9KkNV5bJfJO+qCDtn6vqReA@mail.gmail.com> <alpine.BSO.2.03.1309101834110.15199@ejurka.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox