git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 9e10898) | patch
Support infinity and -infinity in the numeric data type.
2020年7月22日 23:19:44 +0000 (19:19 -0400)
2020年7月22日 23:19:44 +0000 (19:19 -0400)
commit a57d312a7706321d850faa048a562a0c0c01b835
Support infinity and -infinity in the numeric data type.

Add infinities that behave the same as they do in the floating-point
data types. Aside from any intrinsic usefulness these may have,
this closes an important gap in our ability to convert floating
values to numeric and/or replace float-based APIs with numeric.

The new values are represented by bit patterns that were formerly
not used (although old code probably would take them for NaNs).
So there shouldn't be any pg_upgrade hazard.

Patch by me, reviewed by Dean Rasheed and Andrew Gierth

Discussion: https://postgr.es/m/606717.1591924582@sss.pgh.pa.us
12 files changed:
contrib/jsonb_plperl/jsonb_plperl.c diff | blob | blame | history
contrib/jsonb_plpython/jsonb_plpython.c diff | blob | blame | history
doc/src/sgml/datatype.sgml diff | blob | blame | history
src/backend/utils/adt/formatting.c diff | blob | blame | history
src/backend/utils/adt/numeric.c diff | blob | blame | history
src/include/utils/numeric.h diff | blob | blame | history
src/test/regress/expected/aggregates.out diff | blob | blame | history
src/test/regress/expected/numeric.out diff | blob | blame | history
src/test/regress/expected/window.out diff | blob | blame | history
src/test/regress/sql/aggregates.sql diff | blob | blame | history
src/test/regress/sql/numeric.sql diff | blob | blame | history
src/test/regress/sql/window.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /