Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
doc: Fix typo in example query of SQL/JSON
authorMichael Paquier <michael@paquier.xyz>
Fri, 16 Apr 2021 07:56:29 +0000 (16:56 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 16 Apr 2021 07:56:29 +0000 (16:56 +0900)
Author: Erik Rijkers
Discussion: https://postgr.es/m/1219476687.20432.1617452918468@webmailclassic.xs4all.nl
Backpatch-through: 12

doc/src/sgml/json.sgml

index 6ff875187050f615dbf4a892f41cfe81331417bf..76b346a651ac97c3f944f88a52cf58dd03975c31 100644 (file)
@@ -487,7 +487,7 @@ CREATE INDEX idxgintags ON api USING GIN ((jdoc -&gt; 'tags'));
 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>.