Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: 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:15:34
Message-ID: 13936.1216271734@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-jdbc
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 suspect that you aren't getting true "Infinity" from
'infinity'::float8 in the first place, but some large number,
which then fails to fit into float4.

			regards, tom lane

In response to

Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2008-07-17 05:22:58
Subject: Re: Problem with java infinity mapping to postgres real column type
Previous:From: Kris JurkaDate: 2008-07-17 03:52:19
Subject: Re: Problem with java infinity mapping to postgres real column type

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group