Re: Ryu floating point output patch

Andrew Gierth <andrew@tao11.riddles.org.uk>

From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: "pgsql-hackers\@postgresql.org" <pgsql-hackers@postgresql.org>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>, Donald Dong <xdong@csumb.edu>, Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Chapman Flack <chap@anastigmatix.net>
Date: 2019-01-19T14:06:08Z
Lists: pgsql-hackers

Attachments

>>>>> "Andrew" == Andrew Gierth <andrew@tao11.riddles.org.uk> writes:

 Andrew> 4. Passes regression tests

 Andrew> Well, almost. I missed a contrib module, and there's some
 Andrew> issues with rounding and subnormal values on Windows that I
 Andrew> need to track down.

This should fix all the known issues.

This does make one significant change to the algorithm: it will no
longer return the exact midpoint between two values (thereby relying on
the reader to get the correct rounding direction). This gains
portability without compromising the performance (which is not affected
by the change).

-- 
Andrew (irc:RhodiumToad)

Commits

  1. Provide an extra-float-digits setting for pg_dump / pg_dumpall

  2. Change floating-point output format for improved performance.

  3. Use strtof() and not strtod() for float4 input.