Michael, Fuhr wrote:
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.
Here it is:
val: NaN
fabs(val): NaN
FLOAT4_MAX: 340282346638528859811704183484516925440.000000
It must be a compiler bug in gcc 2.96 because I had an older
one (2.95.3) from the SFWgcc package installed under /opt/sfw
and using that all test results were OK.
I installed the new gcc 3.4.2 and that worked too.
Tamas
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend