Re: pg12 release notes - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: pg12 release notes
Date
Msg-id 87r295hjur.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: pg12 release notes  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg12 release notes  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
>>>>> "Bruce" == Bruce Momjian <bruce@momjian.us> writes:

 >> I noticed that the compatibility note for Andrew Gierth's RYU
 >> floating point patch seems to simply say why the feature is useful.
 >> Shouldn't it be listed separately, and its impact on users upgrading
 >> be listed here instead?

 Bruce> The text is now in the incompatibility section:

 Bruce> http://momjian.us/pgsql_docs/release-12.html

 Bruce> Avoid performing unnecessary rounding of REAL and DOUBLE PRECISION
 Bruce> values (Andrew Gierth)
    
 Bruce> This dramatically speeds up processing of floating-point values, though
 Bruce> trailing digits are display slightly differently. Users who wish to have
 Bruce> ------------------------------------------------
 Bruce> output that is rounded can set extra_float_digits=0. 

 Bruce> Do I need more?

That isn't quite how I'd have worded it, but I'm not sure what the best
wording is. Something like:

 * Output REAL and DOUBLE PRECISION values in shortest-exact format by
   default, and change the behavior of extra_float_digits

   Previously, float values were output rounded to 6 or 15 decimals by
   default, with the number of decimals adjusted by extra_float_digits.
   The previous rounding behavior is no longer the default, and is now
   done only if extra_float_digits is set to zero or less; if the value
   is greater than zero (which it is by default), a shortest-precise
   representation is output (for a substantial performance improvement).
   This representation preserves the exact binary value when correctly
   read back in, even though the trailing digits will usually differ
   from the output generated by previous versions when
   extra_float_digits=3.

But I'm not 100% happy with this wording and am entirely open to
suggestions for improvement.

(In passing I've spotted some related typos in the body of the docs
which are probably my fault, I'll fix those.)

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: pg12 release notes
Next
From: Bruce Momjian
Date:
Subject: Re: pg12 release notes