From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Florents Tselai <florents(dot)tselai(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
Subject: | Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part |
Date: | 2025-05-23 17:52:01 |
Message-ID: | 2568904.1748022721@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Florents Tselai <florents(dot)tselai(at)gmail(dot)com> writes:
> On 22 May 2025, at 11:56 PM, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>> I don't understand how this discussion got to the conclusion that functions that depend on the locale cannot be immutable. Note that the top-level functions lower, upper, and initcap themselves are immutable.
> I assume you mean that they’re set at initdb time, so there’s no mutability concern?
Yeah, I think Peter's right and I'm wrong. Obviously this ties into
our philosophical debate about how immutable is immutable. But as
long as the functions only depend on locale settings that are fixed
at database creation, I think it's okay to consider them immutable.
If you were, say, depending on LC_NUMERIC, it would clearly be unsafe
to consider that immutable, so I'm not quite sure if this is the end
of the discussion. But for what's mentioned in the thread title,
I think we only care about LC_CTYPE.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2025-05-23 17:55:17 | Re: Replication slot is not able to sync up |
Previous Message | Tom Lane | 2025-05-23 17:39:15 | Re: Why our Valgrind reports suck |