Thread: pgsql: SQL JSON path enhanced numeric literals

pgsql: SQL JSON path enhanced numeric literals

From
Peter Eisentraut
Date:
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/102a5c164a91d717632f3a24f1289a5fa4861973

Modified Files
--------------
doc/src/sgml/json.sgml                 |  12 +++
src/backend/catalog/sql_features.txt   |   1 +
src/backend/utils/adt/jsonpath_scan.l  |  60 +++++++++---
src/test/regress/expected/jsonpath.out | 162 +++++++++++++++++++++++++++++++++
src/test/regress/sql/jsonpath.sql      |  50 ++++++++++
5 files changed, 271 insertions(+), 14 deletions(-)