pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add additional jsonpath string methods
Date: Thu, 02 Apr 2026 19:20:03 +0000
Message-ID: <E1w8NaF-002eKx-0A@gemulon.postgresql.org> (raw )
Add additional jsonpath string methods
Add the following jsonpath methods:
* l/r/btrim()
* lower(), upper()
* initcap()
* replace()
* split_part()
Each simply dispatches to the standard string processing functions.
These depend on the locale, but since it's set at `initdb`, they can be
considered immutable and therefore allowed in any jsonpath expression.
Author: Florents Tselai <florents.tselai@gmail.com>
Co-authored-by: David E. Wheeler <david@justatheory.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/CA+v5N40sJF39m0v7h=QN86zGp0CUf9F1WKasnZy9nNVj_VhCZQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bd4f879a9cdd11b6b683cea0ea51d7c27a8f1153
Modified Files
--------------
doc/src/sgml/func/func-json.sgml | 140 +++++++++
src/backend/utils/adt/jsonpath.c | 117 ++++++-
src/backend/utils/adt/jsonpath_exec.c | 178 +++++++++++
src/backend/utils/adt/jsonpath_gram.y | 33 +-
src/backend/utils/adt/jsonpath_scan.l | 8 +
src/include/utils/jsonpath.h | 8 +
src/test/regress/expected/jsonb_jsonpath.out | 381 +++++++++++++++++++++++
src/test/regress/expected/jsonpath.out | 186 +++++++++++
src/test/regress/expected/sqljson_queryfuncs.out | 10 +-
src/test/regress/sql/jsonb_jsonpath.sql | 106 +++++++
src/test/regress/sql/jsonpath.sql | 41 +++
src/test/regress/sql/sqljson_queryfuncs.sql | 11 +-
12 files changed, 1212 insertions(+), 7 deletions(-)
Message-ID: <E1w8NaF-002eKx-0A@gemulon.postgresql.org>
Permalink: ../E1w8NaF-002eKx-0A@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1w8NaF-002eKx-0A@gemulon.postgresql.org
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: andrew@dunslane.net, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add additional jsonpath string methods
In-Reply-To: <E1w8NaF-002eKx-0A@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox