RE: [JDBC] timestamp parsing

From: Peter Mount <petermount(at)maidstone(dot)gov(dot)uk>
To: "'wrobell'" <wrobell(at)posexperts(dot)com(dot)pl>, pgsql-patches(at)postgresql(dot)org
Subject: RE: [JDBC] timestamp parsing
Date: 2000-11-24 08:11:26
Message-ID: 1B3D5E532D18D311861A00600865478CF1B5AB@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Answers prefixed with PM:

--
Peter Mount
Enterprise Support Officer, Maidstone Borough Council
Email: petermount(at)maidstone(dot)gov(dot)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(at)posexperts(dot)com(dot)pl]
Sent: Monday, November 20, 2000 11:43 AM
To: pgsql-patches(at)postgresql(dot)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...

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2000-11-25 05:00:22 Re: 7.1: to_char(): Y,YY,YYY,YYYY fix
Previous Message Karel Zak 2000-11-23 11:44:21 7.1: to_char(): Y,YY,YYY,YYYY fix