summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian2024-11-20 22:03:45 +0000
committerBruce Momjian2024-11-20 22:03:45 +0000
commit7eff3138fc86cbea556c63a902fd3fcbf04bdf1d (patch)
tree081a32ebee668b74779c68070e5a095984254fe2 /doc/src
parentfea81aee83b50c514c4ba6789e22c22c028e3df2 (diff)
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
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 13e1642192a..cb9a6e2c910 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17125,8 +17125,8 @@ ERROR: value too long for type character(2)
<returnvalue>boolean</returnvalue>
</para>
<para>
- Returns the result of a JSON path predicate check for the specified
- JSON value.
+ Returns the SQL boolean result of a JSON path predicate check
+ for the specified JSON value.
(This is useful only
with <link linkend="functions-sqljson-check-expressions">predicate
check expressions</link>, not SQL-standard JSON path expressions,
@@ -17593,9 +17593,9 @@ SELECT '{
Boolean predicate, whereas the SQL standard allows predicates only within
filters. While SQL-standard path expressions return the relevant
element(s) of the queried JSON value, predicate check expressions
- return the single three-valued result of the
+ return the single three-valued <type>jsonb</type> result of the
predicate: <literal>true</literal>,
- <literal>false</literal>, or <literal>unknown</literal>.
+ <literal>false</literal>, or <literal>null</literal>.
For example, we could write this SQL-standard filter expression:
<screen>
<prompt>=&gt;</prompt> <userinput>select jsonb_path_query(:'json', '$.track.segments ?(@[*].HR &gt; 130)');</userinput>