On Thu, Jan 27, 2005 at 02:33:05PM -0700, Michael Fuhr wrote:
> 
> A few months ago an issue with strtod() on Solaris came up:
> 
> http://archives.postgresql.org/pgsql-bugs/2004-08/msg00073.php
> http://archives.postgresql.org/pgsql-bugs/2004-08/msg00127.php
> 
> I wonder if you're experiencing a related or similar problem that
> only shows up with certain build tools.

The errors were the following:

  template1=# SELECT 'NaN'::float4;
  ERROR:  22003: type "real" value out of range: overflow
  LOCATION:  CheckFloat4Val, float.c:219

The code around float.c:219 looks like this:

  if (fabs(val) > FLOAT4_MAX)
          ereport(ERROR,
                          (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
                           errmsg("type \"real\" value out of range: 
overflow")));

I wonder what a debugging printf() would show for val, fabs(val),
and FLOAT4_MAX here.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to