Re: [BUGS] JDBC driver doesn't handle NaN values

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: [BUGS] JDBC driver doesn't handle NaN values
Дата
Msg-id Pine.LNX.4.33.0401090418040.6759-200000@leary.csoft.net
обсуждение исходный текст
Список pgsql-jdbc

On Fri, 9 Jan 2004, Jonathan Purvis wrote:

> The JDBC driver that ships with PostgreSQL 7.4.1 doesn't insert floats
> of value NaN.  As it uses Float.toString(x) to convert the value for
> insertion into the database, it tries to insert NaN instead of 'NaN' and
> gets the error "Attribute 'nan' not found".  The same bug occurs for
> doubles and will probably occur for infinite values as well (i haven't
> tested it).  This bug also exists in 7.2.4 and in the 7.2.1 version
> currently in Debian stable.

As you noted this is a problem with positive and negative infinity, but
there are some more problems as evidenced by the attached test case.

Double.MIN_VALUE will cause underflow.
Double.MAX_VALUE goes in alright, but comes out as POSITIVE_INFINITY

when trying Float.MAX_VALUE and MIN_VALUE on a real or float4 field they
overflow and underflow respectively.

Kris Jurka

Вложения

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

Предыдущее
От: "Antonio Gallardo"
Дата:
Сообщение: Re: [BUG] - Invalid UNICODE character sequence found
Следующее
От: "Xavier Bugaud"
Дата:
Сообщение: RE : Nmber of rows in a ResultSet