From: | Erik Rijkers <er(at)xs4all(dot)nl> |
---|---|
To: | kanobt61(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org, PG Doc comments form <noreply(at)postgresql(dot)org> |
Subject: | Re: Typo in DATATYPE-JSONPATH |
Date: | 2021-04-16 06:11:53 |
Message-ID: | 844280457.225243.1618553513835@webmailclassic.xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
> On 2021.04.15. 22:04 PG Doc comments form <noreply(at)postgresql(dot)org> wrote:
>
> Page: https://www.postgresql.org/docs/13/datatype-json.html
> Description:
>
> Hello,
>
> On the DATATYPE-JSONPATH page:
> https://www.postgresql.org/docs/13/datatype-json.html#DATATYPE-JSONPATH
>
> There is a line that shows that GIN indexes support `@@` and `(at)?` operators
> for json matching, then there are two examples trying to show both
> operators. However both examples use the `@@` operator.
>
> Examples from the doc:
>
> SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] ==
> "qui"';
> SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] ? (@ ==
> "qui")';
>
> I think the second example should be using the `(at)?` operator so that both
> sample queries do the same thing but with the different operator types. So
> the second example should read:
>
> SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @? '$.tags[*] ? (@ ==
> "qui")';
>
> Thank you,
> Ben
FWIW, I agree with this and already sent a doc-patch [1], which is be applied from 12, 13, and master.
Erik
[1] https://www.postgresql.org/message-id/1219476687.20432.1617452918468@webmailclassic.xs4all.nl
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-04-16 06:35:32 | Re: Typo in DATATYPE-JSONPATH |
Previous Message | Michael Paquier | 2021-04-16 01:20:17 | Re: INCLUDING COMPRESSION |