| From: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> |
|---|---|
| To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Cc: | "David E(dot) Wheeler" <david(at)justatheory(dot)com>, Florents Tselai <florents(dot)tselai(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com> |
| Subject: | Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part |
| Date: | 2026-04-03 14:34:57 |
| Message-ID: | CAB-JLwbJEhkdB53yZmn8YxrCHVqWKV7ddr_7vb6ytPA3vKcKxg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Em sex., 3 de abr. de 2026 às 10:36, Andrew Dunstan <andrew(at)dunslane(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Munro | 2026-04-03 14:37:26 | Re: pg_waldump: support decoding of WAL inside tarfile |
| Previous Message | Imran Zaheer | 2026-04-03 14:14:18 | Re: Silence -Wmaybe-uninitialized warnings |