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

BUG #4880: gcc (4.4) + double precision differences

From: "Jeremy Ford" <jeremford(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4880: gcc (4.4) + double precision differences
Date: 2009-06-25 13:32:27
Message-ID: 200906251332.n5PDWRV1035801@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      4880
Logged by:          Jeremy Ford
Email address:      jeremford(at)gmail(dot)com
PostgreSQL version: 8.3.7 + 8.4.RC2
Operating system:   Linux
Description:        gcc (4.4) + double precision differences
Details: 

I've just had a problem restoring a table on a 8.4.RC2 database compiled
with GCC 4.4.0.  The original table (from a 8.3.7 GCC 4.1.2 database) had
some "double precision" values that should have been outside the "allowed
ranges" (values created with PL/R).  The pg_restore process failed to
restore any data to that table as (at least) one row had an invalid value:
EST ERROR:  "5.926613861253257e-319" is out of range for type double
precision

I have run the following on a few various databases I have access to:

select 1e-319::double precision; 

8.2.5 - 32 bit linux (Fedora 8) GCC 4.1.2 --> "ERROR:  type "double
precision" value out of range: underflow"
8.3.7 - 32 bit linux (Fedora 8) GCC 4.1.2 --> 9.99988867182683e-320
8.3.7 - 64bit linux (Fedora 8) GCC  4.1.2  --> 9.99988867182683e-320
8.3.7 - 64bit linux (Fedora 11) GCC 4.4.0 --> ".. is out of range for type
double precision"

8.4.rc2 - 32 bit linux (Fedora 10) GCC 4.3.2 --> 9.99988867182683e-320
8.4.rc1 - 32 bit linux (Fedora 11) GCC 4.4.0  -->  ".. is out of range for
type double precision"

Besides fixing the data, is there anyway of recompiling with GCC 4.4.0 to
allow these values? Any other options or recommendations?

Cheers, Jeremy.

pgsql-bugs by date

Next:From: Simon RiggsDate: 2009-06-25 13:33:29
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recoverymode
Previous:From: Greg StarkDate: 2009-06-25 13:01:42
Subject: Re: [BUGS] Integrity check

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