JSON_TABLE
authorAndrew Dunstan <[email protected]>
Mon, 4 Apr 2022 19:36:03 +0000 (15:36 -0400)
committerAndrew Dunstan <[email protected]>
Mon, 4 Apr 2022 20:03:47 +0000 (16:03 -0400)
commit4e34747c88a03ede6e9d731727815e37273d4bc9
treec7318a224b908c5dbaba3198324c90ec5429c3a5
parentc42a6fc41dc22b42e5417224440c02893996afb4
JSON_TABLE

This feature allows jsonb data to be treated as a table and thus used in
a FROM clause like other tabular data. Data can be selected from the
jsonb using jsonpath expressions, and hoisted out of nested structures
in the jsonb to form multiple rows, more or less like an outer join.

Nikita Glukhov

Reviewers have included (in no particular order) Andres Freund, Alexander
Korotkov, Pavel Stehule, Andrew Alsup, Erik Rijkers, Zhihong Yu (whose
name I previously misspelled), Himanshu Upadhyaya, Daniel Gustafsson,
Justin Pryzby.

Discussion: https://postgr.es/m/7e2cb85d-24cf-4abb-30a5-1a33715959bd@postgrespro.ru
31 files changed:
src/backend/commands/explain.c
src/backend/executor/execExpr.c
src/backend/executor/execExprInterp.c
src/backend/executor/nodeTableFuncscan.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/parser/Makefile
src/backend/parser/gram.y
src/backend/parser/parse_clause.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_jsontable.c [new file with mode: 0644]
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/utils/adt/jsonpath_exec.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/misc/queryjumble.c
src/include/executor/execExpr.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/nodes/primnodes.h
src/include/parser/kwlist.h
src/include/parser/parse_clause.h
src/include/utils/jsonpath.h
src/test/regress/expected/json_sqljson.out
src/test/regress/expected/jsonb_sqljson.out
src/test/regress/sql/json_sqljson.sql
src/test/regress/sql/jsonb_sqljson.sql
src/tools/pgindent/typedefs.list