pgsql: Make floating-point "NaN / 0" return NaN instead of raising an e

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Make floating-point "NaN / 0" return NaN instead of raising an e
Дата
Msg-id E1jxfSo-0004Y5-8Y@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Make floating-point "NaN / 0" return NaN instead of raising an error.

This is more consistent with the IEEE 754 spec and our treatment of
NaNs elsewhere; in particular, the case has always acted that way in
"numeric" arithmetic.

Noted by Dean Rasheed.

Discussion: https://postgr.es/m/3421746.1594927785@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4fb6aeb4f6e807c8ce3e140d2d2281f50eb6fb1a

Modified Files
--------------
src/include/utils/float.h                             | 4 ++--
src/test/regress/expected/float4-misrounded-input.out | 6 ++++++
src/test/regress/expected/float4.out                  | 6 ++++++
src/test/regress/expected/float8.out                  | 6 ++++++
src/test/regress/sql/float4.sql                       | 1 +
src/test/regress/sql/float8.sql                       | 1 +
6 files changed, 22 insertions(+), 2 deletions(-)


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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: pgsql: Assert that buffer is pinned in LockBuffer().
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix some corner cases for window ranges with infinite offsets.