Re: help with front/backend datatype converting - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: help with front/backend datatype converting
Date
Msg-id 25794.1168054222@sss.pgh.pa.us
Whole thread Raw
In response to Re: help with front/backend datatype converting  ("Do, Leon \(Leon\)" <leondo@alcatel-lucent.com>)
List pgsql-jdbc
"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

pgsql-jdbc by date:

Previous
From: "Do, Leon \(Leon\)"
Date:
Subject: Re: help with front/backend datatype converting
Next
From: Mikko Tiihonen
Date:
Subject: Binary protocol patch v7