diff options
author | Andrew Dunstan | 2025-03-05 14:50:34 +0000 |
---|---|---|
committer | Andrew Dunstan | 2025-03-05 15:04:02 +0000 |
commit | 4603903d294bbdd644afecf9b5970827db6d1ff5 (patch) | |
tree | 29212352a8e09f5076b03c752976b416eeba8014 /src/include | |
parent | 5ead85fbc81162ab1594f656b036a22e814f96b3 (diff) |
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.tselai@gmail.com>
Discussion: https://postgr.es/m/4BCECCD5-4F40-4313-9E98-9E16BEB0B01D@gmail.com
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/pg_proc.dat | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index cd9422d0bac..134b3dd8689 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -9269,7 +9269,7 @@ proname => 'to_json', provolatile => 's', prorettype => 'json', proargtypes => 'anyelement', prosrc => 'to_json' }, { oid => '3261', descr => 'remove object fields with null values from json', - proname => 'json_strip_nulls', prorettype => 'json', proargtypes => 'json', + proname => 'json_strip_nulls', prorettype => 'json', proargtypes => 'json bool', prosrc => 'json_strip_nulls' }, { oid => '3947', @@ -10205,7 +10205,7 @@ prorettype => 'jsonb', proargtypes => '', prosrc => 'jsonb_build_object_noargs' }, { oid => '3262', descr => 'remove object fields with null values from jsonb', - proname => 'jsonb_strip_nulls', prorettype => 'jsonb', proargtypes => 'jsonb', + proname => 'jsonb_strip_nulls', prorettype => 'jsonb', proargtypes => 'jsonb bool', prosrc => 'jsonb_strip_nulls' }, { oid => '3478', |