Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part
Alexander Korotkov <aekorotkov@gmail.com>
From: Alexander Korotkov <aekorotkov@gmail.com>
To: Florents Tselai <florents.tselai@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-09-26T10:57:25Z
Lists: pgsql-hackers
Hi, Florents!
On Wed, Sep 25, 2024 at 9:18 PM Florents Tselai
<florents.tselai@gmail.com> wrote:
> This patch is a follow-up and generalization to [0].
>
> It adds the following jsonpath methods: lower, upper, initcap, l/r/btrim, replace, split_part.
>
> It makes jsonpath able to support expressions like these:
>
> select jsonb_path_query('" hElLo WorlD "', '$.btrim().lower().upper().lower().replace("hello","bye") starts with "bye"');
> select jsonb_path_query('"abc~@~def~@~ghi"', '$.split_part("~@~", 2)')
Did you check if these new methods now in SQL standard or project of
SQL standard?
------
Regards,
Alexander Korotkov
Supabase
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