Common SQL/JSON clauses
authorAndrew Dunstan <andrew@dunslane.net>
Thu, 3 Mar 2022 18:00:49 +0000 (13:00 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 22 Mar 2022 21:32:54 +0000 (17:32 -0400)
commit865fe4d5df560a6f5353da652018ff876978ad2d
tree47d3609a7b5fbf1fb60a1559a1af40b0df961de6
parenta3b071bbe050252b35c589a7f1a2ee2f7ee3e9d4
Common SQL/JSON clauses

This introduces some of the building blocks used by the SQL/JSON
constructor and query functions. Specifically, it provides node
executor and grammar support for the FORMAT JSON [ENCODING foo]
clause, and values decorated with it, and for the RETURNING clause.

The following SQL/JSON patches will leverage these.

Nikita Glukhov (who probably deserves an award for perseverance).

Reviewers have included (in no particular order) Andres Freund, Alexander
Korotkov, Pavel Stehule, Andrew Alsup. Erik Rijkers, Zihong Yu and
Himanshu Upadhyaya.

Discussion: https://postgr.es/m/cd0bb935-0158-78a7-08b5-904886deac4b@postgrespro.ru
17 files changed:
src/backend/executor/execExpr.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/makefuncs.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/util/clauses.c
src/backend/parser/gram.y
src/backend/parser/parse_expr.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/misc/queryjumble.c
src/include/nodes/makefuncs.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/nodes/primnodes.h
src/include/parser/kwlist.h