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

From: Palle Girgensohn <girgen(at)partitur(dot)se>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
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-09 02:45:56
Message-ID: 3AF8AF64.DC970DA@partitur.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces 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(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

Attachment Content-Type Size
patch-jdbc-getdate application/octet-stream 1007 bytes

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 2001-05-09 02:58:08 Re: Re: [INTERFACES] Postgres odbc driver bug
Previous Message Hiroshi Inoue 2001-05-09 02:05:47 Re: Re: [INTERFACES] Postgres odbc driver bug

Browse pgsql-jdbc by date

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