Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part

Florents Tselai <florents.tselai@gmail.com>

From: Florents Tselai <florents.tselai@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Robert Haas <robertmhaas@gmail.com>, Alexander Korotkov <aekorotkov@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>, Andrew Dunstan <andrew@dunslane.net>
Date: 2025-05-23T17:06:25Z
Lists: pgsql-hackers

> On 22 May 2025, at 11:56 PM, Peter Eisentraut <peter@eisentraut.org> wrote:
> 
> On 09.05.25 21:50, Robert Haas wrote:
>> I always struggle a bit to remember our policy on these issues -- to
>> the best of my knowledge, we haven't documented it anywhere, and I
>> think we probably should. I believe the way it works is that whenever
>> a function depends on the operating system's timestamp or locale
>> definitions, we decide it has to be stable, not immutable. We don't
>> expect those things to be updated very often, but we know sometimes
>> they do get updated.
> 
> 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? 




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add additional jsonpath string methods

  2. Rename jsonpath method arg tokens

  3. Fix transient memory leakage in jsonpath evaluation.

  4. Make jsonpath .string() be immutable for datetimes.