From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Get rid of backtracking in jsonpath_scan.l
Date: Mon, 25 Mar 2019 12:44:08 +0000
Message-ID: <E1h8OxU-00066d-Ji@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org
Subject: Re: pgsql: Get rid of backtracking in jsonpath_scan.l
In-Reply-To: <E1h8OxU-00066d-Ji@gemulon.postgresql.org>
References: <E1h8OxU-00066d-Ji@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox