JSON path decimal literal syntax

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: JSON path decimal literal syntax
Date: 2022-02-18 10:17:20
Message-ID: 50a828cc-0a00-7791-7883-2ed06dfb2dbb@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I noticed that the JSON path lexer does not support the decimal literal
syntax forms

.1
1.

(that is, there are no digits before or after the decimal point). This
is allowed by the relevant ECMAScript standard
(https://262.ecma-international.org/5.1/#sec-7.8.3) and of course SQL
allows it as well.

Is there a reason for this? I didn't find any code comments or
documentation about this.

Attached are patches that would enable this. As you can see, a bunch of
test cases are affected.

Attachment Content-Type Size
v1-0001-Test-cases-for-JSON-path-decimal-literals.patch text/plain 1.8 KB
v1-0002-Fix-JSON-path-decimal-literal-syntax.patch text/plain 7.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-02-18 10:27:22 Re: logical replication empty transactions
Previous Message Christoph Berg 2022-02-18 09:39:09 Re: pgsql: pg_upgrade: Preserve relfilenodes and tablespace OIDs.