pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Rijkers <er@xs4all.nl>
To: pgsql-committers@lists.postgresql.org <pgsql-committers@lists.postgresql.org>
Subject: fix old confusing JSON example
Date: Sat, 3 Apr 2021 14:01:38 +0200 (CEST)
Message-ID: <1409005792.20330.1617451298469@webmailclassic.xs4all.nl> (raw)

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.

Thanks,

Erik Rijkers

Attachments:

json.sgml.20210403.diff (text/x-patch, 632B) download --- doc/src/sgml/json.sgml.orig 2021-04-03 13:47:29.484510936 +0200 +++ doc/src/sgml/json.sgml 2021-04-03 13:47:53.028866752 +0200 @@ -489,7 +489,7 @@ 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>.

view thread (8+ messages)  latest in thread

Message-ID: <1409005792.20330.1617451298469@webmailclassic.xs4all.nl>
Permalink:  ../1409005792.20330.1617451298469@webmailclassic.xs4all.nl/
Also on:    postgresql.org/message-id/1409005792.20330.1617451298469@webmailclassic.xs4all.nl

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: er@xs4all.nl
  Subject: Re: fix old confusing JSON example
  In-Reply-To: <1409005792.20330.1617451298469@webmailclassic.xs4all.nl>
  References: <1409005792.20330.1617451298469@webmailclassic.xs4all.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox