Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 70236cf

Browse files
committed
doc: clarify that jsonb_path_match() returns an SQL boolean
Not a JSON boolean. Also clarify that other predicate check expressions functions return a JSON boolean, not an SQL boolean. Reported-by: jian he Discussion: https://postgr.es/m/CACJufxH7tP1NXCHN1bUBXcEB=dv7-qE+ZjB3UxwK6Em+9Qzb9Q@mail.gmail.com Backpatch-through: 17
1 parent f722dd3 commit 70236cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/src/sgml/func.sgml

+4-4
Original file line numberDiff line numberDiff line change
@@ -17178,8 +17178,8 @@ ERROR: value too long for type character(2)
1717817178
<returnvalue>boolean</returnvalue>
1717917179
</para>
1718017180
<para>
17181-
Returns the result of a JSON path predicate check for the specified
17182-
JSON value.
17181+
Returns the SQL boolean result of a JSON path predicate check
17182+
for the specified JSON value.
1718317183
(This is useful only
1718417184
with <link linkend="functions-sqljson-check-expressions">predicate
1718517185
check expressions</link>, not SQL-standard JSON path expressions,
@@ -17646,9 +17646,9 @@ SELECT '{
1764617646
Boolean predicate, whereas the SQL standard allows predicates only within
1764717647
filters. While SQL-standard path expressions return the relevant
1764817648
element(s) of the queried JSON value, predicate check expressions
17649-
return the single three-valued result of the
17649+
return the single three-valued <type>jsonb</type> result of the
1765017650
predicate: <literal>true</literal>,
17651-
<literal>false</literal>, or <literal>unknown</literal>.
17651+
<literal>false</literal>, or <literal>null</literal>.
1765217652
For example, we could write this SQL-standard filter expression:
1765317653
<screen>
1765417654
<prompt>=&gt;</prompt> <userinput>select jsonb_path_query(:'json', '$.track.segments ?(@[*].HR &gt; 130)');</userinput>

0 commit comments

Comments
 (0)