Re: Problem in ResultSet#getTimestamp() of 7.2b4

From: Ryouichi Matsuda <r-matuda(at)sra(dot)co(dot)jp>
To: barry(at)xythos(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problem in ResultSet#getTimestamp() of 7.2b4
Date: 2002-01-17 11:00:01
Message-ID: 20020117195641.7740.R-MATUDA@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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 Content-Type Size
GetTimestampTest.java application/octet-stream 2.1 KB
jdbc1.ResultSet.java.diff application/octet-stream 6.0 KB
jdbc2.ResultSet.java.diff application/octet-stream 6.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Turbo Fredriksson 2002-01-17 12:25:07 Performance
Previous Message Jean-Michel POURE 2002-01-17 09:06:41 CREATE OR REPLACE VIEW / TRIGGER

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vardan Gyurjyan 2002-01-17 13:12:35 jdbc:posgresql problem
Previous Message David De Mizio 2002-01-17 04:33:58 Datasource question...