| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | Staroverov Ilja <i(dot)staroverov(at)ftdata(dot)ru>, Peter Eisentraut <peter(at)eisentraut(dot)org>, "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:18:05 |
| Message-ID: | 871538.1792513085@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Fujii Masao <masao(dot)fujii(at)gmail(dot)com> writes:
> 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?
I don't mind marking xpath() as STABLE, but I wonder if doing so for
quote_ident() would cause performance issues. But a quick look
through our frontend programs didn't turn up any usages that look
like they'd be candidates for constant-folding, so maybe it's fine.
I agree we can't just leave it as-is, so the alternative would be
to force the SQL function to use one behavior or the other. That
might make people unhappy in a different way.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-10-20 17:03:04 | Re: BUG #19771: to_char(): NUL byte in result for formats with a trailing decimal point (regression from ec352b37d) |
| Previous Message | Fujii Masao | 2026-10-20 16:05:23 | Re: BUG #19644: byteaout, float8out and float4out are marked IMMUTABLE but depend on GUCs |