Re: draft patch for strtof()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: draft patch for strtof()
Дата
Msg-id 28380.1547652059@sss.pgh.pa.us
обсуждение исходный текст
Ответ на draft patch for strtof()  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: draft patch for strtof()  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список 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 по дате отправления:

Предыдущее
От: Shay Rojansky
Дата:
Сообщение: Re: [PATCH] Allow UNLISTEN during recovery
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: draft patch for strtof()