Re: Problems with infinity

From: Kris Jurka <books(at)ejurka(dot)com>
To: Oliver Siegmar <o(dot)siegmar(at)vitrado(dot)de>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problems with infinity
Date: 2005-01-13 13:42:07
Message-ID: Pine.BSO.4.56.0501130835370.26@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 13 Jan 2005, Oliver Siegmar wrote:

> I'm using PostgreSQL 7.4.6 with pg74.215.jdbc3.jar and have trouble with
> infinite timestamp values.
>
> Caused by: org.postgresql.util.PSQLException: Bad Timestamp Format at 0 in
> 9999-01-01

This is indeed a bug in the 7.4 drivers.

> Furthermore, in your TODO list I read "The conversion to/from datatypes
> supporting infinity is silly because Java doesn't have a similar concept.
> Throw an exception instead.".

Actually the fact that the 7.4 drivers don't even work and no one has ever
complained previously is a pretty strong endorsement of this todo item
(which has already been done in the 8.0 codebase.)

> That's really bad. I can't change the database content because several stored
> procedures are based on infinite timestamp values.
>

You may use getString() on the column and check for infinity yourself.
Using setString(x, "Infinity") will work with the 7.4 drivers, but not
8.0. Perhaps we could make setObject(x, "Infinity", Types.TIMESTAMP)
accomodate this though...

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Siegmar 2005-01-13 13:52:31 Re: Problems with infinity
Previous Message Oliver Siegmar 2005-01-13 13:19:00 Problems with infinity