Re: Ryu floating point output patch

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>, Tom Lane <tgl@sss.pgh.pa.us>, Chapman Flack <chap@anastigmatix.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-01-11T18:42:25Z
Lists: pgsql-hackers
On Fri, Jan 11, 2019 at 1:40 PM Andres Freund <andres@anarazel.de> wrote:
> It'd potentially change data between an non-ryu->{ryu,non-ryu} and
> ryu->ryu versions, for dumps that didn't specify extra_float_digits =
> 3. But that'd not be pg_dump, and already broken previously, so I don't
> have particularly much sympathy?

Agreed.

> And of course it'd change the dump's text contents between ryu and
> non-ryu backends even with extra_float_digits = 3, but the resulting
> floats ought to be the same. It's just that ryu is better at figuring
> out what the minimal text representation is than the current code.

wfm.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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.