Wednesday, July 16, 2008

Re: [JDBC] Problem with java infinity mapping to postgres real column type

Tom Lane wrote:
> Kris Jurka <books@ejurka.com> writes:
>> Actually the problem is:
>> jurka=# select 'infinity'::float8::float4;
>> ERROR: type "real" value out of range: overflow
>
> Well, that's definitely a problem, but what PG version are you testing
> on what platform? I get this using CVS HEAD on Fedora 9, Darwin, and
> HPUX:
>
> regression=# select 'infinity'::float8::float4;
> float4
> ----------
> Infinity
> (1 row)
>

I get the error (or variant) for 7.4 -> 8.2 on Debian Linux. 8.3 and
HEAD work.

I see this in the 8.3 release notes:

Fix float4/float8 to handle Infinity and NAN (Not A Number) consistently
(Bruce) The code formerly was not consistent about distinguishing
Infinity from overflow conditions.

Kris Jurka


--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

No comments: