summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2015-10-07 09:06:49 -0400
committerBruce Momjian <bruce@momjian.us>2015-10-07 09:06:49 -0400
commit2169e878c4a542e41a7d66cbb40d9c6bfde23f57 (patch)
tree7908d0d65e305efbb4b6d6fc58e7c932a0e718aa /doc/src
parent02580df6c3ac288f2ed5e38ed42532512993d468 (diff)
docs: clarify JSONB operator descriptions
No catalog bump as the catalog changes are for SQL operator comments. Backpatch through 9.5
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml16
-rw-r--r--doc/src/sgml/json.sgml5
2 files changed, 13 insertions, 8 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 262f5eea9fb..11bd6ea0f1b 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -10331,32 +10331,36 @@ table2-mapping
<row>
<entry><literal>@&gt;</literal></entry>
<entry><type>jsonb</type></entry>
- <entry>Does the left JSON value contain within it the right value?</entry>
+ <entry>Does the left JSON value contain the right JSON
+ path/value entries at the top level?</entry>
<entry><literal>'{"a":1, "b":2}'::jsonb &#64;&gt; '{"b":2}'::jsonb</literal></entry>
</row>
<row>
<entry><literal>&lt;@</literal></entry>
<entry><type>jsonb</type></entry>
- <entry>Is the left JSON value contained within the right value?</entry>
+ <entry>Are the left JSON path/value entries contained at the top level within
+ the right JSON value?</entry>
<entry><literal>'{"b":2}'::jsonb &lt;@ '{"a":1, "b":2}'::jsonb</literal></entry>
</row>
<row>
<entry><literal>?</literal></entry>
<entry><type>text</type></entry>
- <entry>Does the key/element <emphasis>string</emphasis> exist within
- the JSON value?</entry>
+ <entry>Does the <emphasis>string</emphasis> exist as a top-level
+ key within the JSON value?</entry>
<entry><literal>'{"a":1, "b":2}'::jsonb ? 'b'</literal></entry>
</row>
<row>
<entry><literal>?|</literal></entry>
<entry><type>text[]</type></entry>
- <entry>Do any of these key/element <emphasis>strings</emphasis> exist?</entry>
+ <entry>Do any of these array <emphasis>strings</emphasis>
+ exist as top-level keys?</entry>
<entry><literal>'{"a":1, "b":2, "c":3}'::jsonb ?| array['b', 'c']</literal></entry>
</row>
<row>
<entry><literal>?&amp;</literal></entry>
<entry><type>text[]</type></entry>
- <entry>Do all of these key/element <emphasis>strings</emphasis> exist?</entry>
+ <entry>Do all of these array <emphasis>strings</emphasis> exist
+ as top-level keys?</entry>
<entry><literal>'["a", "b"]'::jsonb ?&amp; array['a', 'b']</literal></entry>
</row>
<row>
diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml
index 1e78558e27a..b4b390b23eb 100644
--- a/doc/src/sgml/json.sgml
+++ b/doc/src/sgml/json.sgml
@@ -369,8 +369,9 @@ SELECT '"foo"'::jsonb ? 'foo';
</para>
<para>
The default GIN operator class for <type>jsonb</> supports queries with
- the <literal>@&gt;</>, <literal>?</>, <literal>?&amp;</>
- and <literal>?|</> operators.
+ top-level key-exists operators <literal>?</>, <literal>?&amp;</>
+ and <literal>?|</> operators and path/value-exists operator
+ <literal>@&gt;</>.
(For details of the semantics that these operators
implement, see <xref linkend="functions-jsonb-op-table">.)
An example of creating an index with this operator class is: