public inbox for [email protected]help / color / mirror / Atom feed
Typo in DATATYPE-JSONPATH 3+ messages / 3 participants [nested] [flat]
* Typo in DATATYPE-JSONPATH @ 2021-04-15 20:04 PG Doc comments form <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: PG Doc comments form @ 2021-04-15 20:04 UTC (permalink / raw) To: [email protected]; +Cc: [email protected] The following documentation comment has been logged on the website: 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 `@?` 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 `@?` 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 ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Typo in DATATYPE-JSONPATH @ 2021-04-16 06:11 Erik Rijkers <[email protected]> parent: PG Doc comments form <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Erik Rijkers @ 2021-04-16 06:11 UTC (permalink / raw) To: [email protected]; [email protected]; PG Doc comments form <[email protected]> > On 2021.04.15. 22:04 PG Doc comments form <[email protected]> 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 `@?` 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 `@?` 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/[email protected] ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Typo in DATATYPE-JSONPATH @ 2021-04-16 06:35 Michael Paquier <[email protected]> parent: Erik Rijkers <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Michael Paquier @ 2021-04-16 06:35 UTC (permalink / raw) To: Erik Rijkers <[email protected]>; +Cc: [email protected]; [email protected]; PG Doc comments form <[email protected]> On Fri, Apr 16, 2021 at 08:11:53AM +0200, Erik Rijkers wrote: > FWIW, I agree with this and already sent a doc-patch [1], which is > be applied from 12, 13, and master. Arf. I completely forgot about this thread but I marked it as something to look at. Will do so now. -- Michael Attachments: [application/pgp-signature] signature.asc (833B, 2-signature.asc) download ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-04-16 06:35 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-04-15 20:04 Typo in DATATYPE-JSONPATH PG Doc comments form <[email protected]> 2021-04-16 06:11 ` Erik Rijkers <[email protected]> 2021-04-16 06:35 ` Michael Paquier <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox