Re: [GENERAL] Floating point error

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Tom Duffey *EXTERN*" <tduffey(at)trillitech(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] Floating point error
Date: 2013-03-01 12:01:25
Message-ID: A737B7A37273E048B164557ADEF4A58B057B9B71@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Tom Duffey wrote (on -general):
> To bring closure to this thread, my whole problem was caused by not knowing about the
> extra_float_digits setting. We have a script that uses COPY to transfer a subset of rows from a very
> large production table to a test table. The script was not setting extra_float_digits so the values
> did not match even though they appeared to match when running queries in psql. Definitely another
> gotcha for floating point values and it might be a good idea to mention this setting on the "Numeric
> Types" page of the docs.

True; how about this patch.

Yours,
Laurenz Albe

Attachment Content-Type Size
float.patch application/octet-stream 839 bytes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc Mamin 2013-03-01 12:51:02 query syntax to combine 2 set returning functions ?
Previous Message Chris Hanks 2013-03-01 09:59:28 Re: Poor performance when using a window function in a view

Browse pgsql-hackers by date

  From Date Subject
Next Message Ants Aasma 2013-03-01 13:56:42 Re: Materialized views WIP patch
Previous Message Jonathan Rogers 2013-03-01 06:40:28 Re: Btrfs clone WIP patch