From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: PLAN clauses for JSON_TABLE
Date: Tue, 05 Apr 2022 18:35:59 +0000
Message-ID: <E1nbo23-000TEP-5a@gemulon.postgresql.org> (raw)
PLAN clauses for JSON_TABLE
These clauses allow the user to specify how data from nested paths are
joined, allowing considerable freedom in shaping the tabular output of
JSON_TABLE.
PLAN DEFAULT allows the user to specify the global strategies when
dealing with sibling or child nested paths. The is often sufficient to
achieve the necessary goal, and is considerably simpler than the full
PLAN clause, which allows the user to specify the strategy to be used
for each named nested path.
Nikita Glukhov
Reviewers have included (in no particular order) Andres Freund, Alexander
Korotkov, Pavel Stehule, Andrew Alsup, Erik Rijkers, Zhihong Yu,
Himanshu Upadhyaya, Daniel Gustafsson, Justin Pryzby.
Discussion: https://postgr.es/m/7e2cb85d-24cf-4abb-30a5-1a33715959bd@postgrespro.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/fadb48b00e02ccfd152baa80942de30205ab3c4f
Modified Files
--------------
src/backend/nodes/copyfuncs.c | 26 ++
src/backend/nodes/equalfuncs.c | 3 +
src/backend/nodes/makefuncs.c | 19 +
src/backend/nodes/outfuncs.c | 3 +
src/backend/nodes/readfuncs.c | 3 +
src/backend/parser/gram.y | 130 +++++-
src/backend/parser/parse_jsontable.c | 323 +++++++++++++--
src/backend/utils/adt/jsonpath_exec.c | 118 ++++--
src/backend/utils/adt/ruleutils.c | 50 +++
src/include/nodes/makefuncs.h | 2 +
src/include/nodes/nodes.h | 1 +
src/include/nodes/parsenodes.h | 42 ++
src/include/nodes/primnodes.h | 3 +
src/include/parser/kwlist.h | 1 +
src/test/regress/expected/jsonb_sqljson.out | 600 ++++++++++++++++++++++++++--
src/test/regress/sql/jsonb_sqljson.sql | 396 +++++++++++++++++-
src/tools/pgindent/typedefs.list | 3 +
17 files changed, 1614 insertions(+), 109 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: andrew@dunslane.net
Subject: Re: pgsql: PLAN clauses for JSON_TABLE
In-Reply-To: <E1nbo23-000TEP-5a@gemulon.postgresql.org>
References: <E1nbo23-000TEP-5a@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