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

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Barry Lind <barry(at)xythos(dot)com>
Cc: Juhan-Peep Ernits <juhan(at)cc(dot)ioc(dot)ee>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate()
Date: 2001-03-21 09:11:59
Message-ID: 985165919.3ab8705f5ccb9@webmail.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-jdbc

Quoting Barry Lind <barry(at)xythos(dot)com>:

> Actually it was the changes in version 1.21 on 2/13 that broke this.
> The cvs log for that change includes the following comment:
> - Removed need for SimpleDateFormat in ResultSet.getDate() improving
> performance.
>
> My guess is the the code as written would work correctly for a 'date'
> column, but doesn't work for a 'timestamp' column. Is there a reason
> you are not using getTimestamp() to get the value of the timestamp
> column?

One of the first things I'm doing once 7.1 is out is add some sanity checking
so that the get/set methods on Date, Timestamp, integer, double etc so that
getDate() on a Timestamp would work, but also getTimestamp() on a Date column.

However, this isn't going to be that easy, and (when I thought of this) 7.1 was
already in beta - and this being new functionality couldn't be put in ;-)

Peter

--
Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Juhan-Peep Ernits 2001-03-21 09:29:23 Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate()
Previous Message Silky Mittal 2001-03-21 05:29:54 problem compiling the jdbc driver

Browse pgsql-jdbc by date

  From Date Subject
Next Message Juhan-Peep Ernits 2001-03-21 09:29:23 Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate()
Previous Message selvam 2001-03-21 02:16:03 Re: pg703: support for Large objects via JDBC PreparedStatement.setBi naryStream()