Re: BUG #19840: contain_mutable_functions() misses VOLATILE sub-expressions in SQL/JSON functions when the jsonpath

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 303677365(at)qq(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19840: contain_mutable_functions() misses VOLATILE sub-expressions in SQL/JSON functions when the jsonpath
Date: 2026-11-11 22:28:55
Message-ID: 3415898.1794436135@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> When an SQL/JSON function's path expression is a NULL jsonpath constant,
> `contain_mutable_functions()` wrongly reports the whole expression as
> immutable, so VOLATILE sub-expressions in the same JsonExpr (RETURNING
> coercion, PASSING values, DEFAULT/ON ERROR expressions) escape the
> check.

Yup, clearly a thinko, thanks for the report.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2026-11-11 22:34:18 Re: BUG #19849: queries fail after ANALYZE with expression stats on arrays
Previous Message PG Bug reporting form 2026-11-11 22:19:51 BUG #19893: REPLICA IDENTITY FULL: UPDATE/DELETE skipped when a subscriber-only column has a value