RE: jsonb_strip_nulls with arrays?

Shinoda, Noriyoshi <noriyoshi.shinoda@hpe.com>

From: "Shinoda, Noriyoshi (SXD Japan FSI)" <noriyoshi.shinoda@hpe.com>
To: Andrew Dunstan <andrew@dunslane.net>, Ian Lawrence Barwick <barwick@gmail.com>, Florents Tselai <florents.tselai@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-03-06T14:17:44Z
Lists: pgsql-hackers

Attachments

Hi,
Thanks for developing the good feature.
I've attached a small patch for the documentation of the json_strip_nulls function. The data type of the 'target' parameter is different between the implementation and the documentation. The implementation is json_stripe_nulls (target JSON, ...), but the current documentation says json_stripe_nulls(target JSONB, ...). 

Regards,
Noriyoshi Shinoda

-----Original Message-----
From: Andrew Dunstan <andrew@dunslane.net> 
Sent: Thursday, March 6, 2025 10:51 PM
To: Ian Lawrence Barwick <barwick@gmail.com>; Florents Tselai <florents.tselai@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: jsonb_strip_nulls with arrays?


On 2025-03-05 We 7:10 PM, Ian Lawrence Barwick wrote:
> Hi
>
> 2025年3月1日(土) 2:58 Florents Tselai <florents.tselai@gmail.com>:
>> Please add this to the next Commitfest at 
>> https://urldefense.com/v3/__https://commitfest.postgresql.org/52/__;!
>> !NpxR!moyYqgSNJn8nLYGjlKKZDuERAzIwnFY8Ge_C5MHDuoPRpTJI9Ee0gsyF4IeybO-
>> t--xu2idPkLF240-sxqpR$
>>
>>
>> Added ; thanks
>>   
>> https://urldefense.com/v3/__https://commitfest.postgresql.org/patch/5
>> 260/__;!!NpxR!moyYqgSNJn8nLYGjlKKZDuERAzIwnFY8Ge_C5MHDuoPRpTJI9Ee0gsy
>> F4IeybO-t--xu2idPkLF24zKVAj03$
> I see this was committed, but there's a small formatting error in the 
> docs (extra comma in the parameter list); patch attached.
>

Thanks, pushed.


cheers


andrew

--
Andrew Dunstan
EDB: https://urldefense.com/v3/__https://www.enterprisedb.com__;!!NpxR!moyYqgSNJn8nLYGjlKKZDuERAzIwnFY8Ge_C5MHDuoPRpTJI9Ee0gsyF4IeybO-t--xu2idPkLF24-WSxzSS$ 



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Allow json{b}_strip_nulls to remove null array elements