JSON path decimal literal syntax

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-02-18T10:17:20Z
Lists: pgsql-hackers

Attachments

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.

Commits

  1. Make JSON path numeric literals more correct