Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part
David E. Wheeler <david@justatheory.com>
From: "David E. Wheeler" <david@justatheory.com>
To: Florents Tselai <florents.tselai@gmail.com>
Cc: Alexander Korotkov <aekorotkov@gmail.com>,
Tom Lane <tgl@sss.pgh.pa.us>,
pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-09-27T09:45:23Z
Lists: pgsql-hackers
On Sep 26, 2024, at 13:59, Florents Tselai <florents.tselai@gmail.com> wrote: > Speaking of extensible: the jsonpath standard does mention function extensions [1] , > so it looks like we're covered by the standard, and the mutability aspect is an implementation detail. No? That’s not the standard used for Postgres jsonpath. Postgres follows the SQL/JSON standard in the SQL standard, which is not publicly available, but a few people on the list have copies they’ve purchased and so could provide some context. In a previous post I wondered if the SQL standard had some facility for function extensions, but I suspect not. Maybe in the next iteration? > And having said that, the whole jsonb/jsonpath parser/executor infrastructure is extremely powerful > and kinda under-utilized if we use it "only" for jsonpath. > Tbh, I can see it supporting more specific DSLs and even offering hooks for extensions. > And I know for certain I'm not the only one thinking about this. > See [2] for example where they've lifted, shifted and renamed the jsonb/jsonpath infra to build a separate language for graphs I’m all for extensibility, though jsonpath does need to continue to comply with the SQL standard. Do you have some idea of the sorts of hooks that would allow extension authors to use some of that underlying capability? Best, David
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