mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
Restrict some cases in parsing numerics in jsonpath
Jsonpath now accepts integers with leading zeroes and floats starting with a dot. However, SQL standard requires to follow JSON specification, which doesn't allow none of these cases. Our json[b] datatypes also restrict that. So, restrict it in jsonpath altogether. Author: Nikita Glukhov
This commit is contained in:
@ -80,9 +80,9 @@ any [^\?\%\$\.\[\]\{\}\(\)\|\&\!\=\<\>\@\#\,\*:\-\+\/\\\"\' \t\n\r\f]
|
||||
blank [ \t\n\r\f]
|
||||
|
||||
digit [0-9]
|
||||
integer {digit}+
|
||||
decimal {digit}*\.{digit}+
|
||||
decimalfail {digit}+\.
|
||||
integer (0|[1-9]{digit}*)
|
||||
decimal {integer}\.{digit}+
|
||||
decimalfail {integer}\.
|
||||
real ({integer}|{decimal})[Ee][-+]?{digit}+
|
||||
realfail1 ({integer}|{decimal})[Ee]
|
||||
realfail2 ({integer}|{decimal})[Ee][-+]
|
||||
|
Reference in New Issue
Block a user