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

From Bruce Momjian
Subject Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate()
Date
Msg-id 200105081644.f48GiPH09382@candle.pha.pa.us
Whole thread Raw
List pgsql-jdbc
> 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

pgsql-jdbc by date:

Previous
From: Palle Girgensohn
Date:
Subject: Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate()
Next
From: Palle Girgensohn
Date:
Subject: Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate()