Hello,

Attached is a small but confusing mistake in the json documentation (a @@ 
instead of @?) that has been there since version 12.  (It took me quite some 
time to figure that out while testing with the recent SQL/JSON patches -- which 
I initially blamed).
 
To be applied from 12, 13, and master.

Thanks,

Erik Rijkers
--- doc/src/sgml/json.sgml.orig	2021-04-03 13:47:29.484510936 +0200
+++ doc/src/sgml/json.sgml	2021-04-03 13:47:53.028866752 +0200
@@ -489,7 +489,7 @@
 SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] == "qui"';
 </programlisting>
 <programlisting>
-SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] ? (@ == "qui")';
+SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @? '$.tags[*] ? (@ == "qui")';
 </programlisting>
     GIN index extracts statements of following form out of
     <literal>jsonpath</literal>: <replaceable>accessors_chain</replaceable> = <replaceable>const</replaceable>.

Reply via email to