Re: BUG #19409: Function jsonb_strip_nulls() changed from immutable to stable. - Mailing list pgsql-bugs

From Florents Tselai
Subject Re: BUG #19409: Function jsonb_strip_nulls() changed from immutable to stable.
Date
Msg-id CA+v5N43CCjEtORJdn3Q0+uh=ztorEiiUnWBVc2TNci4zJ57ntQ@mail.gmail.com
Whole thread
In response to Re: BUG #19409: Function jsonb_strip_nulls() changed from immutable to stable.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs


On Fri, Feb 13, 2026 at 10:18 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
PG Bug reporting form <noreply@postgresql.org> writes:
> ... this fails in PostgreSQL 18, because the jsonb_strip_nulls ( target
> jsonb [,strip_in_arrays boolean ] ) function changed from immutable to
> stable.

A bit of git excavation shows that this changed here:

Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master Release: REL_18_BR [4603903d2] 2025-03-05 10:04:02 -0500

    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

It looks like a thinko to me, because surely the strip_in_arrays
parameter did not make the function more mutable than before.

The perils of going from pg_proc.dat to manual defs in system_functions.sql  
Attachment

pgsql-bugs by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: BUG #19407: pg_dump : DROP RULE creates forward references
Next
From: Thomas Munro
Date:
Subject: Re: BUG #19406: substring(text) fails on valid UTF-8 toasted value in PostgreSQL 15.16