pgsql: Add json_strip_nulls and jsonb_strip_nulls functions.
| От | Andrew Dunstan |
|---|---|
| Тема | pgsql: Add json_strip_nulls and jsonb_strip_nulls functions. |
| Дата | |
| Msg-id | E1XzQnA-0003et-Ce@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Add json_strip_nulls and jsonb_strip_nulls functions. The functions remove object fields, including in nested objects, that have null as a value. In certain cases this can lead to considerably smaller datums, with no loss of semantic information. Andrew Dunstan, reviewed by Pavel Stehule. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/237a8824430c607fce1eafde0c625744d50a455c Modified Files -------------- doc/src/sgml/func.sgml | 23 ++++ src/backend/utils/adt/jsonfuncs.c | 197 +++++++++++++++++++++++++++++++++ src/include/catalog/catversion.h | 2 +- src/include/catalog/pg_proc.h | 5 + src/include/utils/json.h | 2 + src/test/regress/expected/json.out | 50 +++++++++ src/test/regress/expected/json_1.out | 50 +++++++++ src/test/regress/expected/jsonb.out | 50 +++++++++ src/test/regress/expected/jsonb_1.out | 50 +++++++++ src/test/regress/sql/json.sql | 20 ++++ src/test/regress/sql/jsonb.sql | 19 ++++ 11 files changed, 467 insertions(+), 1 deletion(-)
В списке pgsql-committers по дате отправления: