Re: BUG #19841: SQL/JSON RETURNING coercion to GUC-dependent types (timestamptz etc.) is wrongly judged IMMUTABLE -

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: 303677365(at)qq(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19841: SQL/JSON RETURNING coercion to GUC-dependent types (timestamptz etc.) is wrongly judged IMMUTABLE -
Date: 2026-11-10 04:35:17
Message-ID: CAGRkXqQYDBqmknd66UG86vqnSzGJyJteD0m0wF3tVboTrLqhwA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi

Thanks for the reports. #19840, #19841 and #19850 come from the same
check in contain_mutable_functions_walker(), so the attached patch
fixes all three.

One interesting thing is that existing indexes using these
expressions will fail on restore and pg_upgrade, like in b58a9a97fe7.

I still lean toward 17 and up with a release note, since those indexes can
already
return wrong results.

Thanks,
Shihao

Attachment Content-Type Size
v1-REL_17_18-0001-Fix-mutability-checks-of-SQL-JSON-query-functions.-nocfbot.txt text/plain 7.6 KB
v1-0001-Fix-mutability-checks-of-SQL-JSON-query-functions.patch application/octet-stream 7.7 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Sho Ito 2026-11-10 05:18:03 Re: BUG #19714: pgcrypto pgp_sym_encrypt accepts nonnumeric s2k-mode as mode 0
Previous Message Michael Paquier 2026-11-10 03:52:52 Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti