From: Tom Lane <tgl@sss.pgh.pa.us>
To: 303677365@qq.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19840: contain_mutable_functions() misses VOLATILE sub-expressions in SQL/JSON functions when the jsonpath
Date: Wed, 11 Nov 2026 17:28:55 -0500
Message-ID: <3415898.1794436135@sss.pgh.pa.us> (raw)
In-Reply-To: <19840-7d5243be84d7ecd3@postgresql.org>
References: <19840-7d5243be84d7ecd3@postgresql.org>
PG Bug reporting form <noreply@postgresql.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, 303677365@qq.com
Subject: Re: BUG #19840: contain_mutable_functions() misses VOLATILE sub-expressions in SQL/JSON functions when the jsonpath
In-Reply-To: <3415898.1794436135@sss.pgh.pa.us>
References: <19840-7d5243be84d7ecd3@postgresql.org> <3415898.1794436135@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox