Re: [JDBC] Re: Trouble with JDBC2 ResultSet.getDate()

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Palle Girgensohn <girgen(at)partitur(dot)se>
Cc: Juhan-Peep Ernits <juhan(at)cc(dot)ioc(dot)ee>, pgsql-interfaces(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] Re: Trouble with JDBC2 ResultSet.getDate()
Date: 2001-05-08 16:44:24
Message-ID: 200105081644.f48GiPH09382@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 2001-05-08 16:55:46 Re: [INTERFACES] Postgres odbc driver bug
Previous Message Palle Girgensohn 2001-05-08 16:43:35 Re: [JDBC] Re: Trouble with JDBC2 ResultSet.getDate()

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2001-05-08 17:17:29 Re: getScale() and getPrecision() patch
Previous Message Palle Girgensohn 2001-05-08 16:43:35 Re: [JDBC] Re: Trouble with JDBC2 ResultSet.getDate()