jdbc2 fails to getDate

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: jdbc2 fails to getDate
Date: 2001-04-23 02:18:00
Message-ID: 200104230218.f3N2I0g19576@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Palle Girgensohn (girgen(at)partitur(dot)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

Browse pgsql-bugs by date

  From Date Subject
Next Message Palle Girgensohn 2001-04-23 02:25:10 Re: select a.name ... union select a.name ... order by a.name fails in 7.1
Previous Message Tom Lane 2001-04-23 02:11:22 Re: select a.name ... union select a.name ... order by a.name fails in 7.1