SQL JSON path enhanced numeric literals
authorPeter Eisentraut <peter@eisentraut.org>
Sun, 5 Mar 2023 14:02:01 +0000 (15:02 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Sun, 5 Mar 2023 14:19:58 +0000 (15:19 +0100)
commit102a5c164a91d717632f3a24f1289a5fa4861973
tree788bbb08c81ab3637284e4153d2ae6b8bcda3001
parent6949b921d545809a83f8a6bad4948f9012a76fb6
SQL JSON path enhanced numeric literals

Add support for non-decimal integer literals and underscores in
numeric literals to SQL JSON path language.  This follows the rules of
ECMAScript, as referred to by the SQL standard.

Internally, all the numeric literal parsing of jsonpath goes through
numeric_in, which already supports all this, so this patch is just a
bit of lexer work and some tests and documentation.

Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/b11b25bb-6ec1-d42f-cedd-311eae59e1fb@enterprisedb.com
doc/src/sgml/json.sgml
src/backend/catalog/sql_features.txt
src/backend/utils/adt/jsonpath_scan.l
src/test/regress/expected/jsonpath.out
src/test/regress/sql/jsonpath.sql