Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part
Date
Msg-id df89cceb-d48a-49ee-b54c-d1b1c648b4c5@dunslane.net
Whole thread Raw
In response to Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part
List pgsql-hackers


On 2026-04-03 Fr 7:51 AM, Andrew Dunstan wrote:


On 2026-04-02 Th 5:10 PM, Marcos Pegoraro wrote:
Em qui., 2 de abr. de 2026 às 16:22, Andrew Dunstan <andrew@dunslane.net> escreveu:

Committed.

There is a typo here. 
<literal>jsonb_path_query('"xyxtrimyyx"', '$.btrim("xyz")')</literal> 
should be 
<literal>jsonb_path_query('"xyztrimxyz"', '$.btrim("xyz")')</literal> 



Good catch, will fix.




On second thoughts, I don't think this is a typo. btrim() removes leading and trailing sequences of any characters in the argument string.:


andrew@~=# select jsonb_path_query('"xyxtrimyyx"', '$.btrim("xyz")');
 jsonb_path_query
------------------
 "trim"
(1 row)


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Small and unlikely overflow hazard in bms_next_member()
Next
From: Daniil Davydov
Date:
Subject: Re: POC: Parallel processing of indexes in autovacuum