git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 38b7437) | patch
SQL/JSON: add standard JSON constructor functions
2023年3月29日 10:11:36 +0000 (12:11 +0200)
2023年3月29日 10:11:36 +0000 (12:11 +0200)
commit 7081ac46ace8c459966174400b53418683c9fe5c
SQL/JSON: add standard JSON constructor functions

This commit introduces the SQL/JSON standard-conforming constructors for
JSON types:

JSON_ARRAY()
JSON_ARRAYAGG()
JSON_OBJECT()
JSON_OBJECTAGG()

Most of the functionality was already present in PostgreSQL-specific
functions, but these include some new functionality such as the ability
to skip or include NULL values, and to allow duplicate keys or throw
error when they are found, as well as the standard specified syntax to
specify output type and format.

Author: Nikita Glukhov <n.gluhov@postgrespro.ru>
Author: Teodor Sigaev <teodor@sigaev.ru>
Author: Oleg Bartunov <obartunov@gmail.com>
Author: Alexander Korotkov <aekorotkov@gmail.com>
Author: Amit Langote <amitlangote09@gmail.com>

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.

Discussion: https://postgr.es/m/CAF4Au4w2x-5LTnN_bxky-mq4=WOqsGsxSpENCzHRAzSnEd8+WQ@mail.gmail.com
Discussion: https://postgr.es/m/cd0bb935-0158-78a7-08b5-904886deac4b@postgrespro.ru
Discussion: https://postgr.es/m/20220616233130.rparivafipt6doj3@alap3.anarazel.de
Discussion: https://postgr.es/m/abd9b83b-aa66-f230-3d6d-734817f0995d%40postgresql.org
42 files changed:
doc/src/sgml/func.sgml diff | blob | blame | history
src/backend/executor/execExpr.c diff | blob | blame | history
src/backend/executor/execExprInterp.c diff | blob | blame | history
src/backend/jit/llvm/llvmjit_expr.c diff | blob | blame | history
src/backend/jit/llvm/llvmjit_types.c diff | blob | blame | history
src/backend/nodes/makefuncs.c diff | blob | blame | history
src/backend/nodes/nodeFuncs.c diff | blob | blame | history
src/backend/optimizer/util/clauses.c diff | blob | blame | history
src/backend/parser/gram.y diff | blob | blame | history
src/backend/parser/parse_expr.c diff | blob | blame | history
src/backend/parser/parse_target.c diff | blob | blame | history
src/backend/parser/parser.c diff | blob | blame | history
src/backend/utils/adt/json.c diff | blob | blame | history
src/backend/utils/adt/jsonb.c diff | blob | blame | history
src/backend/utils/adt/jsonb_util.c diff | blob | blame | history
src/backend/utils/adt/ruleutils.c diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/pg_aggregate.dat diff | blob | blame | history
src/include/catalog/pg_proc.dat diff | blob | blame | history
src/include/executor/execExpr.h diff | blob | blame | history
src/include/nodes/makefuncs.h diff | blob | blame | history
src/include/nodes/parsenodes.h diff | blob | blame | history
src/include/nodes/primnodes.h diff | blob | blame | history
src/include/parser/kwlist.h diff | blob | blame | history
src/include/utils/json.h diff | blob | blame | history
src/include/utils/jsonb.h diff | blob | blame | history
src/interfaces/ecpg/preproc/parse.pl diff | blob | blame | history
src/interfaces/ecpg/preproc/parser.c diff | blob | blame | history
src/interfaces/ecpg/test/ecpg_schedule diff | blob | blame | history
src/interfaces/ecpg/test/expected/sql-sqljson.c [new file with mode: 0644] blob
src/interfaces/ecpg/test/expected/sql-sqljson.stderr [new file with mode: 0644] blob
src/interfaces/ecpg/test/expected/sql-sqljson.stdout [new file with mode: 0644] blob
src/interfaces/ecpg/test/sql/Makefile diff | blob | blame | history
src/interfaces/ecpg/test/sql/meson.build diff | blob | blame | history
src/interfaces/ecpg/test/sql/sqljson.pgc [new file with mode: 0644] blob
src/test/regress/expected/json.out diff | blob | blame | history
src/test/regress/expected/opr_sanity.out diff | blob | blame | history
src/test/regress/expected/sqljson.out [new file with mode: 0644] blob
src/test/regress/parallel_schedule diff | blob | blame | history
src/test/regress/sql/opr_sanity.sql diff | blob | blame | history
src/test/regress/sql/sqljson.sql [new file with mode: 0644] blob
src/tools/pgindent/typedefs.list diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /