From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Mark GUC-dependent type output functions as STABLE
Date: Tue, 20 Oct 2026 06:07:56 +0000
Message-ID: <E1xJ30u-00000002LnZ-2emL@gemulon.postgresql.org> (raw)
Mark GUC-dependent type output functions as STABLE
byteaout and pg_mcv_list_out depend on bytea_output GUC, while
float4out, float8out, and the geometric type output functions depend
on extra_float_digits GUC. The BRIN minmax-multi summary output
function also calls the summarized type's output function, so its result
can depend on the type's output settings.
Mark these functions STABLE instead of IMMUTABLE to reflect their
dependence on session settings. This prevents them from being used in
expressions that require immutability, such as expression indexes,
generated columns, and partition keys.
Do not backpatch, since this changes catalog entries and can break
existing schemas that rely on these output functions being immutable.
Bump catalog version.
Reported-by: 放空 <jj-zhang25@mails.tsinghua.edu.cn>
Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/19644-d6db3fb5e5ad92f4@postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e75fcc9867fdfe295957ad5c9a98cbe2e1b4c5c3
Modified Files
--------------
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 46 ++++++++++++++++++++--------------------
2 files changed, 24 insertions(+), 24 deletions(-)
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-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: Mark GUC-dependent type output functions as STABLE
In-Reply-To: <E1xJ30u-00000002LnZ-2emL@gemulon.postgresql.org>
References: <E1xJ30u-00000002LnZ-2emL@gemulon.postgresql.org>
* 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