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

From: Kris Jurka <jurka(at)ejurka(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kris Jurka <books(at)ejurka(dot)com>, Johan Miller <johanmiller(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problem with java infinity mapping to postgres real column type
Date: 2008-07-17 05:22:58
Message-ID: 487ED732.8070102@ejurka.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Tom Lane wrote:
> Kris Jurka <books(at)ejurka(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Johan Miller 2008-07-17 11:16:30 Re: Problem with java infinity mapping to postgres real column type
Previous Message Tom Lane 2008-07-17 05:15:34 Re: Problem with java infinity mapping to postgres real column type