pgsql: Put in_range_float4_float8's work in-line.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Put in_range_float4_float8's work in-line.
Дата
Msg-id E1fF0wY-0002Aj-Pq@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Put in_range_float4_float8's work in-line.

In commit 8b29e88cd, I'd dithered about whether to make
in_range_float4_float8 be a standalone copy of the float in-range logic
or have it punt to in_range_float8_float8.  I went with the latter, which
saves code space though at the cost of performance and readability.

However, it emerges that this tickles a compiler or hardware bug on
buildfarm member opossum.  Test results from commit 55e0e4581 show
conclusively that widening a float4 NaN to float8 produces Inf, not NaN,
on that machine; which accounts perfectly for the window RANGE test
failures it's been showing.  We can dodge this problem by making
in_range_float4_float8 be an independent function, so that it checks
for NaN inputs before widening them.

Ordinarily I'd not be very excited about working around such obviously
broken functionality; but given that this was a judgment call to begin
with, I don't mind reversing it.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cb3e9e40bc993128cd51795ea60ff7bed78cebb5

Modified Files
--------------
src/backend/utils/adt/float.c | 68 ++++++++++++++++++++++++++++++++++++-------
1 file changed, 58 insertions(+), 10 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Remove extra newlines after PQerrorMessage()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Test conversion of NaN between float4 and float8.