Re: jsonb_strip_nulls with arrays? - Mailing list pgsql-hackers

From Florents Tselai
Subject Re: jsonb_strip_nulls with arrays?
Date
Msg-id F4E9D398-399E-46C1-ABC1-725B7E49261C@gmail.com
Whole thread Raw
In response to jsonb_strip_nulls with arrays?  (Florents Tselai <florents.tselai@gmail.com>)
Responses Re: jsonb_strip_nulls with arrays?
List pgsql-hackers


On 18 Jan 2025, at 11:51 AM, Florents Tselai <florents.tselai@gmail.com> wrote:



On 8 Jan 2025, at 6:45 PM, Andrew Dunstan <andrew@dunslane.net> wrote:


On 2024-09-17 Tu 4:53 PM, Florents Tselai wrote:

We could, if we're going to do anything at all in this area. Another possibility would be to provide a second optional parameter for json{b}_strip_nulls. That's probably a better way to go.

Here's a patch that adds that argument (only for jsonb; no json implementation yet)



I think it looks sane. We're not stripping a top level null, which is one thing I looked out for.

I think we need a json implementation as well, though.


Thanks for having a Look, Andrew; 
if there aren’t any other objections, I’ll come back with a json implementation too. 

Attached is a v2 patch with the missing json implementation. 
jsonb one remains the same.



cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: BitmapHeapScan streaming read user and prelim refactoring
Next
From: Melanie Plageman
Date:
Subject: Re: Trigger more frequent autovacuums of heavy insert tables