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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 1b6f632) | patch
Allow underscores in integer and numeric constants.
Sat, 4 Feb 2023 09:48:51 +0000 (09:48 +0000)
Sat, 4 Feb 2023 09:48:51 +0000 (09:48 +0000)
commit faff8f8e47f18c7d589453e2e0d841d2bd96c1ac
Allow underscores in integer and numeric constants.

This allows underscores to be used in integer and numeric literals,
and their corresponding type input functions, for visual grouping.
For example:

1_500_000_000
3.14159_26535_89793
0xffff_ffff
0b_1001_0001

A single underscore is allowed between any 2 digits, or immediately
after the base prefix indicator of non-decimal integers, per SQL:202x
draft.

Peter Eisentraut and Dean Rasheed

Discussion: https://postgr.es/m/84aae844-dc55-a4be-86d9-4f0fa405cc97%40enterprisedb.com
22 files changed:
doc/src/sgml/syntax.sgml diff | blob | blame | history
src/backend/catalog/sql_features.txt diff | blob | blame | history
src/backend/parser/parse_node.c diff | blob | blame | history
src/backend/parser/scan.l diff | blob | blame | history
src/backend/utils/adt/numeric.c diff | blob | blame | history
src/backend/utils/adt/numutils.c diff | blob | blame | history
src/fe_utils/psqlscan.l diff | blob | blame | history
src/interfaces/ecpg/preproc/pgc.l diff | blob | blame | history
src/pl/plpgsql/src/expected/plpgsql_trap.out diff | blob | blame | history
src/pl/plpgsql/src/sql/plpgsql_trap.sql diff | blob | blame | history
src/test/regress/expected/int2.out diff | blob | blame | history
src/test/regress/expected/int4.out diff | blob | blame | history
src/test/regress/expected/int8.out diff | blob | blame | history
src/test/regress/expected/numeric.out diff | blob | blame | history
src/test/regress/expected/numerology.out diff | blob | blame | history
src/test/regress/expected/partition_prune.out diff | blob | blame | history
src/test/regress/sql/int2.sql diff | blob | blame | history
src/test/regress/sql/int4.sql diff | blob | blame | history
src/test/regress/sql/int8.sql diff | blob | blame | history
src/test/regress/sql/numeric.sql diff | blob | blame | history
src/test/regress/sql/numerology.sql diff | blob | blame | history
src/test/regress/sql/partition_prune.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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