1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-04 20:11:56 +03:00

Get rid of backtracking in jsonpath_scan.l

Non-backtracking flex parsers work faster than backtracking ones.  So, this
commit gets rid of backtracking in jsonpath_scan.l.  That required explicit
handling of some cases as well as manual backtracking for some cases.  More
regression tests for numerics are added.

Discussion: https://mail.google.com/mail/u/0?ik=a20b091faa&view=om&permmsgid=msg-f%3A1628425344167939063
Author: John Naylor, Nikita Gluknov, Alexander Korotkov
This commit is contained in:
Alexander Korotkov
2019-03-25 15:43:56 +03:00
parent 8b17298f0b
commit 1d88a75c42
11 changed files with 800 additions and 29 deletions

View File

@@ -1297,7 +1297,7 @@ select jsonb_path_query('null', 'true.type()');
"boolean"
(1 row)
select jsonb_path_query('null', '123.type()');
select jsonb_path_query('null', '(123).type()');
jsonb_path_query
------------------
"number"