pgsql: SQL JSON path enhanced numeric literals

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: SQL JSON path enhanced numeric literals
Date: 2023-03-05 14:34:11
Message-ID: E1pYpRC-00229S-Pm@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)a(dot)rasheed(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/b11b25bb-6ec1-d42f-cedd-311eae59e1fb(at)enterprisedb(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2023-03-06 03:49:49 pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY.
Previous Message Tom Lane 2023-03-04 18:32:44 pgsql: Avoid failure when altering state of partitioned foreign-key tri