Re: BUG #19644: byteaout, float8out and float4out are marked IMMUTABLE but depend on GUCs

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Staroverov Ilja <i(dot)staroverov(at)ftdata(dot)ru>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "jj-zhang25(at)mails(dot)tsinghua(dot)edu(dot)cn" <jj-zhang25(at)mails(dot)tsinghua(dot)edu(dot)cn>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #19644: byteaout, float8out and float4out are marked IMMUTABLE but depend on GUCs
Date: 2026-10-20 16:05:23
Message-ID: CAHGQGwG8DDiQhZus8rW0D4McvkOYGeGxmr70bn0S15jVqHGHJQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Oct 20, 2026 at 10:20 PM Staroverov Ilja <i(dot)staroverov(at)ftdata(dot)ru> wrote:
> The
> attached patch marks them STABLE, along the lines of the cube patch
> upthread, bumps the hstore version to 1.9, and adds a test that such
> indexes are rejected. Like the other changes here, I'd think this is
> for master only.

Thanks for the patch!
I agree that these hstore functions should be marked STABLE.

The added test checks the existing rejection of non-immutable functions
in index expressions. I don't think it's necessary.

> I also checked core and the other contrib modules for IMMUTABLE
> functions that call the I/O functions of arbitrary types, and found no
> others.

Codex reported two other cases:

- Both xpath() overloads are marked IMMUTABLE, but use float8out() for
numeric results, so their output depends on extra_float_digits.
- quote_ident(text) is marked IMMUTABLE, but calls quote_identifier(),
whose output depends on quote_all_identifiers.

Should these functions also be marked STABLE? Thoughts?

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2026-10-20 16:18:05 Re: BUG #19644: byteaout, float8out and float4out are marked IMMUTABLE but depend on GUCs
Previous Message Rui Zhao 2026-10-20 15:43:41 GIN jsonb_ops misses root strings in strict jsonpath queries