Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 21E1F64FCE4 for ; Thu, 17 Jul 2008 02:15:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 88877-03 for ; Thu, 17 Jul 2008 02:15:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A878664FCDA for ; Thu, 17 Jul 2008 02:15:38 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m6H5FYjh013937; Thu, 17 Jul 2008 01:15:34 -0400 (EDT) To: Kris Jurka cc: Johan Miller , pgsql-jdbc@postgresql.org Subject: Re: Problem with java infinity mapping to postgres real column type In-reply-to: References: <3713c3aa0807142254p72e8416dsd8c18a5ebf101212@mail.gmail.com> <7489.1216217283@sss.pgh.pa.us> Comments: In-reply-to Kris Jurka message dated "Wed, 16 Jul 2008 23:52:19 -0400" Date: Thu, 17 Jul 2008 01:15:34 -0400 Message-ID: <13936.1216271734@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/42 X-Sequence-Number: 18827 Kris Jurka 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