Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate() - Mailing list pgsql-jdbc

From Palle Girgensohn
Subject Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate()
Date
Msg-id 3AF8AF64.DC970DA@partitur.se
Whole thread Raw
In response to Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate()  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-jdbc
Here's a patch that works fine for me.

Cheers,
Palle

Bruce Momjian wrote:
>
> > Well, I didn't see the patch, but my message (probably you just
> > received) points to the fact that getDate shall work on a
> > timestamp column, and some kind of patch shall be applied. I
> > something like this:
> >
> > if s.length() == 10
> >  return java.sql.Date.valueOf(s)
> > else do the old 7.0.3 SimpleDateFormatter stuff.
> >
> > *or*
> >
> > try {
> >   return  java.sql.Date.valueOf(s)
> > } catch (SQLException e) {
> >   do the old SimpleDateFormatter stuff...
> > }
> >
> > sort of... gotta go, or I'd have sent you a full patch.
>
> Would you, please?  Thanks.
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Attachment

pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] MULTIBYTE and SQL_ASCII (was Re: Re: A bug with pgsql 7.1/jdbc and non-ascii (8-bit) chars?)
Next
From: Barry Lind
Date:
Subject: Re: AGAIN: still no answer ... peter, or anybody knowledgeable, please ....