Re: draft patch for strtof() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: draft patch for strtof()
Date
Msg-id 28380.1547652059@sss.pgh.pa.us
Whole thread Raw
In response to draft patch for strtof()  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: draft patch for strtof()  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> As discussed in the Ryu thread, herewith a draft of a patch to use
> strtof() for float4 input (rather than using strtod() with its
> double-rounding issue).

The errno handling in strtof seems bizarrely overcomplex; why do
you need the separate caller_errno variable?

> This includes a fallback to use strtod() the old way if the platform
> lacks strtof(). A variant file for the new regression tests is needed
> for such platforms; I've taken a stab at setting this up for the one
> platform we know will need it (if there are others, the buildfarm will
> let us know in due course).

I'm not that much on board with introducing test cases that we know,
beyond question, are going to be portability headaches.  What will
we actually gain with this, compared to just not having the test case?
I can't see that it's worth either the buildfarm cycles or the human
maintenance effort just to prove that, yes, some platforms have
portability corner cases.  I also don't like the prospect that we
ship releases that will fail basic regression tests on platforms
we haven't tested.  Coping with such failures is a large burden
for affected packagers or end users, especially when the only useful
"coping" mechanism is to ignore the regression test failure.  Might
as well not have it.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Shay Rojansky
Date:
Subject: Re: [PATCH] Allow UNLISTEN during recovery
Next
From: Andrew Gierth
Date:
Subject: Re: draft patch for strtof()