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: "David E. Wheeler" <david@justatheory.com>
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>, Peter Eisentraut <peter@eisentraut.org>
Date: 2025-05-14T15:33:18Z
Lists: pgsql-hackers

Attachments


> On 13 May 2025, at 11:00 PM, David E. Wheeler <david@justatheory.com> wrote:
> 
> On May 13, 2025, at 16:24, Florents Tselai <florents.tselai@gmail.com> wrote:
> 
>> As Robert said—and I agree—renaming the existing _tz family would be more trouble than it’s worth, given the need for deprecations, migration paths, etc. If we were designing this today, suffixes like _stable or _volatile might have been more appropriate, but at this point, we’re better off staying consistent with the _tz family.
> 
> I get the pragmatism, and don’t want to over-bike-shed, but what a wart to live with. [I just went back and re-read Robert’s post, and didn’t realize he used exactly the same expression!] Would it really be too effortful to create _stable or _volatile functions and leave the _tz functions as a sort of legacy?

Thinking about it a second time, you may be right. 
Especially if more people are interested in adding even more methods there.

Here’s a patch just merging the latest changes in the jsonpath tooling; 
no substantial changes to v1; mainly for CFbot to pick this up.

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.