From e50b588614d6d380a447e3b3ee62d5e68c451c25 Mon Sep 17 00:00:00 2001 From: Ted Yu Date: Wed, 23 Sep 2020 13:40:32 -0700 Subject: [PATCH] [#5408] [YSQL] Document jsonpath .** accessor with nesting level filter Summary: Postgres commit was e0e3dad770d3eefc4ee6cd562d9c25b61c263a6e Commit message was: It appears that some variants of .** jsonpath accessor are undocumented. In particular undocumented variants are: .**{level} .**{lower_level to upper_level} .**{lower_level to last} This commit adds missing documentation for them. Test Plan: Build yugabytedb and run test Reviewers: mihnea, jason Reviewed By: jason Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D9450 --- src/postgres/doc/src/sgml/json.sgml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/postgres/doc/src/sgml/json.sgml b/src/postgres/doc/src/sgml/json.sgml index 3e0e92a78500..78e66426ddf1 100644 --- a/src/postgres/doc/src/sgml/json.sgml +++ b/src/postgres/doc/src/sgml/json.sgml @@ -807,6 +807,30 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"tags": ["qu + + + + .**{level} + + + .**{lower_level to + upper_level} + + + .**{lower_level to + last} + + + + + Same as .**, but with filter over nesting + level of JSON hierarchy. Levels are specified as integers. + Zero level corresponds to current object. This is a + PostgreSQL extension of the SQL/JSON + standard. + + +