Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-interfacespgsql-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: patch-jdbc-getdate
Description: application/octet-stream (1007 bytes)

In response to

pgsql-interfaces by date

Next:From: Bruce MomjianDate: 2001-05-09 02:58:08
Subject: Re: Re: [INTERFACES] Postgres odbc driver bug
Previous:From: Hiroshi InoueDate: 2001-05-09 02:05:47
Subject: Re: Re: [INTERFACES] Postgres odbc driver bug

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group