pgsql: Get rid of backtracking in jsonpath_scan.l

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Get rid of backtracking in jsonpath_scan.l
Date: 2019-03-25 12:44:08
Message-ID: E1h8OxU-00066d-Ji@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1d88a75c424664cc85f307a876cde85191d27272

Modified Files
--------------
src/backend/utils/adt/Makefile | 1 +
src/backend/utils/adt/jsonpath_scan.l | 56 +++--
src/test/regress/expected/jsonb_jsonpath.out | 2 +-
src/test/regress/expected/jsonpath.out | 168 +++++++++++++++
src/test/regress/expected/jsonpath_encoding.out | 249 ++++++++++++++++++++++
src/test/regress/expected/jsonpath_encoding_1.out | 237 ++++++++++++++++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/serial_schedule | 1 +
src/test/regress/sql/jsonb_jsonpath.sql | 2 +-
src/test/regress/sql/jsonpath.sql | 30 +++
src/test/regress/sql/jsonpath_encoding.sql | 71 ++++++
11 files changed, 795 insertions(+), 24 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2019-03-25 12:55:45 Re: pgsql: Get rid of backtracking in jsonpath_scan.l
Previous Message Heikki Linnakangas 2019-03-25 09:40:00 pgsql: Clean up the Simple-8b encoder code.

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergei Kornilov 2019-03-25 12:45:21 Re: ALTER TABLE with ADD COLUMN and ADD PRIMARY KEY USING INDEX throws spurious "column contains null values"
Previous Message Kyotaro HORIGUCHI 2019-03-25 12:32:04 Re: [HACKERS] WAL logging problem in 9.4.3?