> On 2021.04.03. 14:01 Erik Rijkers <er@xs4all.nl> wrote:
>
> Hello,
>
> Attached is a small but confusing mistake in the json documentation (a @@ instead of @?) that has been there since
version12. (It took me quite some time to figure that out while testing with the recent SQL/JSON patches -- which I
initiallyblamed).
>
> To be applied from 12, 13, and master.
Oops, sent to wrong list.
Let me add some arguments for the change:
The original text is:
--------------------------
Also, GIN index supports @@ and @? operators, which perform jsonpath matching.
SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] == "qui"';
SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] ? (@ == "qui")';
--------------------------
So, that gives information on two operators, and then gives one example query for each. Clearly, the second example
wasmeant to illustrate a where-clause with the @? operator.
Small change to prevent great confusion (I'll admit it took me far too long to understand this).
thanks,
Erik Rijkers
>
> Thanks,
>
> Erik Rijkers