Re: [GENERAL] Floating point error - Mailing list pgsql-hackers

From Albe Laurenz
Subject Re: [GENERAL] Floating point error
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17BB5D38@ntex2010a.host.magwien.gv.at
Whole thread Raw
In response to Re: [GENERAL] Floating point error  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
Responses Re: [GENERAL] Floating point error  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
List pgsql-hackers
Abhijit Menon-Sen wrote:
> Sorry to nitpick, but I don't like that either, on the grounds that if I
> had been in Tom Duffey's place, this addition to the docs wouldn't help
> me to understand and resolve the problem.
> 
> I'm not entirely convinced that any brief mention of extra_float_digits
> would suffice, but here's a proposed rewording:
> 
>     The <xref linkend="guc-extra-float-digits"> setting controls the
>     number of extra significant digits included when a floating point
>     value is converted to text for output. With the default value of
>     <literal>0</literal>, the output is portable to every platform
>     supported by PostgreSQL. Increasing it will produce output that
>     is closer to the stored value, but may be unportable.
> 
> It's a pretty generic sort of warning, but maybe it would help?

If I understood the original complaint right, anything that gives you
a hint that the textual representation is "truncated" would be helpful.

I like your suggestion and elaborated it a little.

What do you think of the attached version?

Yours,
Laurenz Albe

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [Review] Re: minor patch submission: CREATE CAST ... AS EXPLICIT
Next
From: Cédric Villemain
Date:
Subject: Re: [Review] Re: minor patch submission: CREATE CAST ... AS EXPLICIT