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: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
"David E. Wheeler" <david@justatheory.com>,
Alexander Korotkov <aekorotkov@gmail.com>,
pgsql-hackers <pgsql-hackers@lists.postgresql.org>,
Andrew Dunstan <andrew@dunslane.net>,
Peter Eisentraut <peter@eisentraut.org>
Date: 2025-05-22T16:38:02Z
Lists: pgsql-hackers
> On 22 May 2025, at 5:05 PM, Robert Haas <robertmhaas@gmail.com> wrote: > > On Wed, May 21, 2025 at 2:31 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Having said that, what's wrong with inventing some improved function >> names and never removing the old ones? > > I don't particularly like the clutter, but if the consensus is that > the clutter doesn't matter, fair enough. > It depends really on how much future work we expect in adding more methods in jsonpath. I think there’s a lot of potential there, but that’s a guess really. On David’s point about popularity: In my experience timestamp related stuff from jsonb documents end up in a generated column, and are indexed & queried there. I expect that to continue in PG18 onwards as we’ll have virtual gen columns too. Just to be clear, though, adding another version of these functions means we’ll have an additional (now third) set of the same 5 functions: The vanilla versions are considered stable and the suffixed *_tz or *_volatile (?) jsonb_path_exists jsonb_path_query jsonb_path_query_array jsonb_path_query_first jsonb_path_match
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add additional jsonpath string methods
- bd4f879a9cdd 19 (unreleased) landed
-
Rename jsonpath method arg tokens
- a35c9d524ed0 19 (unreleased) landed
-
Fix transient memory leakage in jsonpath evaluation.
- 5a2043bf7131 19 (unreleased) cited
-
Make jsonpath .string() be immutable for datetimes.
- cb599b9ddfcc 18.0 cited