pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Do, Leon \(Leon\) <leondo@alcatel-lucent.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: Oliver Jowett <oliver@opencloud.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: imad <immaad@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: help with front/backend datatype converting
Date: Fri, 05 Jan 2007 22:30:22 -0500
Message-ID: <25794.1168054222@sss.pgh.pa.us> (raw)
In-Reply-To: <D1EE06BA46B1E4449AF9A4F2FBEE18615E381C@ILEXC2U01.ndc.lucent.com>
References: <D1EE06BA46B1E4449AF9A4F2FBEE18615E381C@ILEXC2U01.ndc.lucent.com>

"Do, Leon \(Leon\)" <leondo@alcatel-lucent.com> writes:
> It can takes any input.  You cann't assume it only return hh:mm.

Yes you can --- see EncodeTimezone().  I concur with Kris' opinion
that the driver need not cater for output formats the server will
never generate.  Especially not if it's explicitly setting DateStyle,
as I seem to remember it does.

One thing that possibly *does* need fixed as of 8.2 is that the server
can generate hh:mm:ss if the timezone has a fractional-minute UTC
offset.  I do not believe there are any modern timezones that do, but
quite a lot do if you check dates 100 or so years ago.

regression=# set timezone = 'Europe/Dublin';
SET
regression=# select now() - '100 years'::interval;
              ?column?               
-------------------------------------
 1907-01-06 03:28:22.483631-00:25:21
(1 row)


			regards, tom lane



view thread (17+ messages)

Message-ID: <25794.1168054222@sss.pgh.pa.us>
Permalink:  ../25794.1168054222@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25794.1168054222@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, leondo@alcatel-lucent.com, books@ejurka.com, oliver@opencloud.com, pg@fastcrypt.com, immaad@gmail.com
  Subject: Re: help with front/backend datatype converting
  In-Reply-To: <25794.1168054222@sss.pgh.pa.us>
  References: <D1EE06BA46B1E4449AF9A4F2FBEE18615E381C@ILEXC2U01.ndc.lucent.com> <25794.1168054222@sss.pgh.pa.us>

* 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