jdbc2 fails to getDate - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject jdbc2 fails to getDate
Date
Msg-id 200104230218.f3N2I0g19576@hub.org
Whole thread Raw
List pgsql-bugs
Palle Girgensohn (girgen@partitur.se) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
jdbc2 fails to getDate

Long Description
Hi.

Here's a java app that has been working well for quite som time on various postgres versions. With 7.1, it fails:

java.lang.NumberFormatException: 12 00:00:00+02
        at java.lang.Integer.parseInt(Integer.java:418)
        at java.lang.Integer.parseInt(Integer.java:458)
        at java.sql.Date.valueOf(Date.java:95)
        at org.postgresql.jdbc2.ResultSet.getDate(ResultSet.java:427)
...

Here's the select that fails:

SELECT ts_start FROM ent_message WHERE id=176;
        ts_start
------------------------
 2001-04-12 00:00:00+02
(1 row)


I have PGDATESTYLE=ISO

Tha failing code in my app is "... res.getDate(1);"


Sample Code


No file was uploaded with this report

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: select a.name ... union select a.name ... order by a.name fails in 7.1
Next
From: Palle Girgensohn
Date:
Subject: select a.name ... union select a.name ... order by a.name fails in 7.1