pgsql: Refactor code used by jsonpath executor to fetch variables - Mailing list pgsql-committers

From Amit Langote
Subject pgsql: Refactor code used by jsonpath executor to fetch variables
Date
Msg-id [email protected]
Whole thread Raw
List pgsql-committers
Refactor code used by jsonpath executor to fetch variables

Currently, getJsonPathVariable() directly extracts a named
variable/key from the source Jsonb value.  This commit puts that
logic into a callback function called by getJsonPathVariable().
Other implementations of the callback may accept different forms
of the source value(s), for example, a List of values passed from
outside jsonpath_exec.c.

Extracted from a much larger patch to add SQL/JSON query functions.

Author: Nikita Glukhov <[email protected]>
Author: Teodor Sigaev <[email protected]>
Author: Oleg Bartunov <[email protected]>
Author: Alexander Korotkov <[email protected]>
Author: Andrew Dunstan <[email protected]>
Author: Amit Langote <[email protected]>

Reviewers have included (in no particular order) Andres Freund,
Alexander Korotkov, Pavel Stehule, Andrew Alsup, Erik Rijkers,
Zihong Yu, Himanshu Upadhyaya, Daniel Gustafsson, Justin Pryzby,
Álvaro Herrera, Jian He, Peter Eisentraut

Discussion: https://postgr.es/m/[email protected]
Discussion: https://postgr.es/m/[email protected]
Discussion: https://postgr.es/m/abd9b83b-aa66-f230-3d6d-734817f0995d%40postgresql.org
Discussion: https://postgr.es/m/CA+HiwqHROpf9e644D8BRqYvaAPmgBZVup-xKMDPk-nd4EpgzHw@mail.gmail.com
Discussion: https://postgr.es/m/CA+HiwqE4XTdfb1nW=Ojoy_tQSRhYt-q_kb6i5d4xcKyrLC1Nbg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/faa2b953ba3be0fac9af614ac14e34cf3a0a2c46

Modified Files
--------------
src/backend/utils/adt/jsonpath_exec.c | 136 +++++++++++++++++++++++++---------
1 file changed, 99 insertions(+), 37 deletions(-)


pgsql-committers by date:

Previous
From: Amit Langote
Date:
Subject: pgsql: Add soft error handling to some expression nodes
Next
From: Michael Paquier
Date:
Subject: pgsql: pgbench: Add \syncpipeline