pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Lister <john.lister-ps@kickstone.com>
To: Peter <peter@greatnowhere.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC problem with dates and ANYELEMENT type
Date: Fri, 24 Apr 2009 10:05:23 +0100
Message-ID: <49F180D3.6070203@kickstone.com> (raw)
In-Reply-To: <01e001c9c4b8$e28c93a0$a7a5bae0$@com>
References: <00e701c9c3eb$625d43a0$2717cae0$@com>
	<Pine.BSO.4.64.0904232234430.16180@leary.csoft.net>
	<01e001c9c4b8$e28c93a0$a7a5bae0$@com>


> What are the potential implications if I patch setDate() method in AbstractJdbc2Statement to pass OID.Date instead of 'unspecified'? Would that break anything else? We don’t use timestamps anywhere in the app yet, so I'm not really worried about timezone being potentially screwed up.
>   
Reading the comments i would guess this would break a few things :(

But i didn't think postgresql supported dates with timezones (times yes 
but not dates), so is the driver being overly cautious. Isn't passing it 
as unspecified with a timezone, effectively passing a timestamp instead 
of a date. Having the result be in the servers timezone might be 
unexpected if the calendar parameter has a timezone, but isn't it the 
correct behaviour?

Similarly looking at the binary patch posted previously, there is a 
comment that dates aren't transmitted in binary because the unit tests 
fail as they expect millisecond accuracy, surely in SQL a date has no 
time component? If you require time as well shouldn't you be using 
timestamp?


Just my thoughts and i guess it probably breaks a few users apps if this 
were applied...

JOHN



view thread (6+ messages)  latest in thread

Message-ID: <49F180D3.6070203@kickstone.com>
Permalink:  ../49F180D3.6070203@kickstone.com/
Also on:    postgresql.org/message-id/49F180D3.6070203@kickstone.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: john.lister-ps@kickstone.com, peter@greatnowhere.com, books@ejurka.com
  Subject: Re: JDBC problem with dates and ANYELEMENT type
  In-Reply-To: <49F180D3.6070203@kickstone.com>
  References: <00e701c9c3eb$625d43a0$2717cae0$@com> <Pine.BSO.4.64.0904232234430.16180@leary.csoft.net> <01e001c9c4b8$e28c93a0$a7a5bae0$@com> <49F180D3.6070203@kickstone.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