pgsql: Add additional jsonpath string methods
| От | Andrew Dunstan |
|---|---|
| Тема | pgsql: Add additional jsonpath string methods |
| Дата | |
| Msg-id | E1w8NaF-002eKx-0A@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
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(-)
В списке pgsql-committers по дате отправления: