Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part
Marcos Pegoraro <marcos@f10.com.br>
From: Marcos Pegoraro <marcos@f10.com.br>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: "David E. Wheeler" <david@justatheory.com>, Florents Tselai <florents.tselai@gmail.com>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>, Chao Li <li.evan.chao@gmail.com>, Álvaro Herrera <alvherre@kurilemu.de>, Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter@eisentraut.org>, Robert Haas <robertmhaas@gmail.com>, Alexander Korotkov <aekorotkov@gmail.com>, jian he <jian.universality@gmail.com>
Date: 2026-04-03T14:34:57Z
Lists: pgsql-hackers
Em sex., 3 de abr. de 2026 às 10:36, Andrew Dunstan <andrew@dunslane.net>
escreveu:
> On second thoughts, I don't think this is a typo. btrim() removes leading
> and trailing sequences of any characters in the argument string.
>
Regression has this, so you are correct.
select jsonb_path_query('"zzzytest"', '$.ltrim("xyz")');
jsonb_path_query
------------------
"test"
I always thought that only those with exactly the same string would be
removed, but thinking char by char, then it makes perfect sense.
And it works like string trim functions, so everything's fine.
Sorry for the noise.
regards
Marcos
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