| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Allow json{b}_strip_nulls to remove null array elements |
| Date: | 2025-03-05 15:04:36 |
| Message-ID: | E1tpqIW-000vNd-0l@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Allow json{b}_strip_nulls to remove null array elements
An additional paramater ("strip_in_arrays") is added to these functions.
It defaults to false. If true, then null array elements are removed as
well as null valued object fields. JSON that just consists of a single
null is not affected.
Author: Florents Tselai <florents(dot)tselai(at)gmail(dot)com>
Discussion: https://postgr.es/m/4BCECCD5-4F40-4313-9E98-9E16BEB0B01D@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4603903d294bbdd644afecf9b5970827db6d1ff5
Modified Files
--------------
doc/src/sgml/func.sgml | 17 +++++++----
src/backend/catalog/system_functions.sql | 14 +++++++++
src/backend/utils/adt/jsonfuncs.c | 27 +++++++++++++++--
src/include/catalog/pg_proc.dat | 4 +--
src/test/regress/expected/json.out | 50 ++++++++++++++++++++++++++++++++
src/test/regress/expected/jsonb.out | 50 ++++++++++++++++++++++++++++++++
src/test/regress/sql/json.sql | 19 ++++++++++++
src/test/regress/sql/jsonb.sql | 18 ++++++++++++
8 files changed, 190 insertions(+), 9 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Geoghegan | 2025-03-05 15:31:27 | pgsql: Revert "Show index search count in EXPLAIN ANALYZE." |
| Previous Message | Peter Geoghegan | 2025-03-05 15:01:18 | Re: pgsql: Show index search count in EXPLAIN ANALYZE. |