Re: Problem in ResultSet#getTimestamp() of 7.2b4 - Mailing list pgsql-jdbc

From Ryouichi Matsuda
Subject Re: Problem in ResultSet#getTimestamp() of 7.2b4
Date
Msg-id 20020117195641.7740.R-MATUDA@sra.co.jp
Whole thread Raw
In response to Re: [HACKERS] Failure in timestamptz of JDBC of 7.2b4  (Barry Lind <barry@xythos.com>)
Responses Re: Problem in ResultSet#getTimestamp() of 7.2b4
Re: Problem in ResultSet#getTimestamp() of 7.2b4
List pgsql-jdbc
Barry Lind wrote:
> Then however I did try your last query:
>
> select 'now'::timestamp without time zone;
>
> and this does fail for me with the string index out of bounds exception.

An attached patch corrects problem of this bug and fractional second.


The handling of time zone was as follows:

  (a) with time zone
      using  SimpleDateFormat("yyyy-MM-dd HH:mm:ss z")
  (b) without time zone
      using  SimpleDateFormat("yyyy-MM-dd HH:mm:ss")


About problem of fractional second,
Fractional second was changed from milli-second to nano-second.

Attachment

pgsql-jdbc by date:

Previous
From: "Vianen, Jeroen van"
Date:
Subject: Re: Problem with getImportedKeys / getExportedKeys
Next
From: "Thomas O'Dowd"
Date:
Subject: Re: Problem in ResultSet#getTimestamp() of 7.2b4