pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kris Jurka <books@ejurka.com>
Cc: Johan Miller <johanmiller@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Problem with java infinity mapping to postgres real column type
Date: Thu, 17 Jul 2008 01:15:34 -0400
Message-ID: <13936.1216271734@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.BSO.4.64.0807162351110.28897@leary.csoft.net>
References: <3713c3aa0807142254p72e8416dsd8c18a5ebf101212@mail.gmail.com>
	<7489.1216217283@sss.pgh.pa.us>
	<Pine.BSO.4.64.0807162351110.28897@leary.csoft.net>

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 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



view thread (7+ messages)  latest in thread

Message-ID: <13936.1216271734@sss.pgh.pa.us>
Permalink:  ../13936.1216271734@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13936.1216271734@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, books@ejurka.com, johanmiller@gmail.com
  Subject: Re: Problem with java infinity mapping to postgres real column type
  In-Reply-To: <13936.1216271734@sss.pgh.pa.us>
  References: <3713c3aa0807142254p72e8416dsd8c18a5ebf101212@mail.gmail.com> <7489.1216217283@sss.pgh.pa.us> <Pine.BSO.4.64.0807162351110.28897@leary.csoft.net> <13936.1216271734@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox