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
- v1-0001-Test-cases-for-JSON-path-decimal-literals.patch (text/plain) patch v1-0001
- v1-0002-Fix-JSON-path-decimal-literal-syntax.patch (text/plain) patch v1-0002
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
-
Make JSON path numeric literals more correct
- e26114c817b6 15.0 landed