RE: [JDBC] timestamp parsing - Mailing list pgsql-patches

From Peter Mount
Subject RE: [JDBC] timestamp parsing
Date
Msg-id 1B3D5E532D18D311861A00600865478CF1B5AB@exchange1.nt.maidstone.gov.uk
Whole thread Raw
In response to [JDBC] timestamp parsing  (wrobell <wrobell@posexperts.com.pl>)
List pgsql-patches
Answers prefixed with PM:

--
Peter Mount
Enterprise Support Officer, Maidstone Borough Council
Email: petermount@maidstone.gov.uk
WWW: http://www.maidstone.gov.uk
All views expressed within this email are not the views of Maidstone Borough
Council


-----Original Message-----
From: wrobell [mailto:wrobell@posexperts.com.pl]
Sent: Monday, November 20, 2000 11:43 AM
To: pgsql-patches@postgresql.org
Subject: [PATCHES] [JDBC] timestamp parsing


Current timestamp parsing is quite complex and buggy
in my opinion, i.e. '2000-09-22 13:21:39+02' works (inserted
with now() function) but inserting '2000-09-22 13:21:39.11+02'::timestamp
(important is '.11+02') does not work (as I know). The problem
exists because postgresql _does_not_ show timestamp in unambiguous way.

After applying attached patch, JDBC sets datestyle to SQL and
uses 'MM/dd/yyyy HH:mm:ss.SS zzzz' format to parse a timestamp.

However the question remains. What should be fixed? JDBC or postgresql?

PM: JDBC probably, but I haven't applied your patch (which you did send
previously), but I haven't yet checked everything out yet. Changing the
datestyle used by the driver from ISO to SQL may only affect getTimestamp(),
but because it's a global thing, I've got to make sure everything else
works.

PM: Please be patient. I am getting through the patches, but like most
people here, I don't work on PostgreSQL full time. I have to fit it in with
my normal work (which technically doesn't include PostgreSQL), and as I'm
about to change jobs, things are going to get worse for a while, but as the
new job is primarily Java Development based (rather than NT4
rescue^H^H^H^H^H^Hadmin) I'll be able to begin work with Servlets & EJB
etc...

pgsql-patches by date:

Previous
From: wrobell
Date:
Subject: [JDBC] timestamp parsing
Next
From: Bruce Momjian
Date:
Subject: Re: 7.1: to_char(): Y,YY,YYY,YYYY fix