SQL/JSON: Update example in JSON_QUERY() documentation
authorAmit Langote
Fri, 13 Sep 2024 07:08:13 +0000 (16:08 +0900)
committerAmit Langote
Fri, 13 Sep 2024 07:10:01 +0000 (16:10 +0900)
Commit 2c27346ed684 fixed the behavior of JSON_QUERY() when WITH
CONDITIONAL WRAPPER is used, but the documentation example wasn't
updated to reflect this change. This commit updates the example to
show the correct result.

Per off-list report from Andreas Ulbrich.

Backpatch-through: 17

doc/src/sgml/func.sgml

index b51dcfd2b4bdcc6dfad958bc4908e4352c128922..fb53c890bcca0fbacacc5d9409183e62472daccc 100644 (file)
@@ -18832,7 +18832,7 @@ ERROR:  jsonpath array subscript is out of bounds
        
        
         JSON_QUERY(jsonb '[1,[2,3],null]', 'lax $[*][$off]' PASSING 1 AS off WITH CONDITIONAL WRAPPER)
-        [3]
+        3
        
        
         JSON_QUERY(jsonb '{"a": "[1, 2]"}', 'lax $.a' OMIT QUOTES)