Re: Problems with infinity

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Problems with infinity
Дата
Msg-id Pine.BSO.4.56.0501130835370.26@leary.csoft.net
обсуждение исходный текст
Ответ на Problems with infinity  (Oliver Siegmar <o.siegmar@vitrado.de>)
Ответы Re: Problems with infinity
Список 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




В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Siegmar
Дата:
Сообщение: Problems with infinity
Следующее
От: Oliver Siegmar
Дата:
Сообщение: Re: Problems with infinity