From: | Erik Rijkers <er(at)xs4all(dot)nl> |
---|---|
To: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: fix old confusing JSON example |
Date: | 2021-04-03 12:28:38 |
Message-ID: | 1219476687.20432.1617452918468@webmailclassic.xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-docs pgsql-hackers |
> On 2021.04.03. 14:01 Erik Rijkers <er(at)xs4all(dot)nl> wrote:
>
> 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.
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 was meant 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
Attachment | Content-Type | Size |
---|---|---|
json.sgml.20210403.diff | text/x-patch | 632 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-04-03 12:32:49 | Re: fix old confusing JSON example |
Previous Message | Erik Rijkers | 2021-04-03 12:01:38 | fix old confusing JSON example |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-04-03 12:32:49 | Re: fix old confusing JSON example |
Previous Message | Erik Rijkers | 2021-04-03 12:01:38 | fix old confusing JSON example |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-04-03 12:30:25 | Re: Proposal: Save user's original authenticated identity for logging |
Previous Message | Julien Rouhaud | 2021-04-03 12:22:06 | Re: Issue with point_ops and NaN |