Re: Ryu floating point output patch

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>, pgsql-hackers@postgresql.org, "David G. Johnston" <david.g.johnston@gmail.com>, Donald Dong <xdong@csumb.edu>, Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, Chapman Flack <chap@anastigmatix.net>
Date: 2019-02-17T15:56:06Z
Lists: pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> I'd been holding off responding in the hope of other opinions, but for
> what it's worth, I *really* dislike having pg_dump depend magically on
> some new environment variable.

Likewise.

> b) new command-line option, e.g. pg_dump --extra-float-digits=0

> This is probably the safest option, IMO. Any preferences as to the
> option name?

I like that too, assuming that it can be made to fit into the
structure of the cross-version-upgrade tests (which would have
to know to use it only with >= v12 pg_dump).

--extra-float-digits seems fine as a name.

			regards, tom lane


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.