Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb852dc4

Browse files
committed
docs: clarify JSONB operator descriptions
No catalog bump as the catalog changes are for SQL operator comments.Backpatch through 9.5
1 parent7e2a18a commitb852dc4

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10333,32 +10333,36 @@ table2-mapping
1033310333
<row>
1033410334
<entry><literal>@&gt;</literal></entry>
1033510335
<entry><type>jsonb</type></entry>
10336-
<entry>Does the left JSON value contain within it the right value?</entry>
10336+
<entry>Does the left JSON value contain the right JSON
10337+
path/value entries at the top level?</entry>
1033710338
<entry><literal>'{"a":1, "b":2}'::jsonb &#64;&gt; '{"b":2}'::jsonb</literal></entry>
1033810339
</row>
1033910340
<row>
1034010341
<entry><literal>&lt;@</literal></entry>
1034110342
<entry><type>jsonb</type></entry>
10342-
<entry>Is the left JSON value contained within the right value?</entry>
10343+
<entry>Are the left JSON path/value entries contained at the top level within
10344+
the right JSON value?</entry>
1034310345
<entry><literal>'{"b":2}'::jsonb &lt;@ '{"a":1, "b":2}'::jsonb</literal></entry>
1034410346
</row>
1034510347
<row>
1034610348
<entry><literal>?</literal></entry>
1034710349
<entry><type>text</type></entry>
10348-
<entry>Does thekey/element<emphasis>string</emphasis> existwithin
10349-
the JSON value?</entry>
10350+
<entry>Does the <emphasis>string</emphasis> existas a top-level
10351+
key withinthe JSON value?</entry>
1035010352
<entry><literal>'{"a":1, "b":2}'::jsonb ? 'b'</literal></entry>
1035110353
</row>
1035210354
<row>
1035310355
<entry><literal>?|</literal></entry>
1035410356
<entry><type>text[]</type></entry>
10355-
<entry>Do any of these key/element <emphasis>strings</emphasis> exist?</entry>
10357+
<entry>Do any of these array <emphasis>strings</emphasis>
10358+
exist as top-level keys?</entry>
1035610359
<entry><literal>'{"a":1, "b":2, "c":3}'::jsonb ?| array['b', 'c']</literal></entry>
1035710360
</row>
1035810361
<row>
1035910362
<entry><literal>?&amp;</literal></entry>
1036010363
<entry><type>text[]</type></entry>
10361-
<entry>Do all of these key/element <emphasis>strings</emphasis> exist?</entry>
10364+
<entry>Do all of these array <emphasis>strings</emphasis> exist
10365+
as top-level keys?</entry>
1036210366
<entry><literal>'["a", "b"]'::jsonb ?&amp; array['a', 'b']</literal></entry>
1036310367
</row>
1036410368
<row>

‎doc/src/sgml/json.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,9 @@ SELECT '"foo"'::jsonb ? 'foo';
369369
</para>
370370
<para>
371371
The default GIN operator class for <type>jsonb</> supports queries with
372-
the <literal>@&gt;</>, <literal>?</>, <literal>?&amp;</>
373-
and <literal>?|</> operators.
372+
top-level key-exists operators <literal>?</>, <literal>?&amp;</>
373+
and <literal>?|</> operators and path/value-exists operator
374+
<literal>@&gt;</>.
374375
(For details of the semantics that these operators
375376
implement, see <xref linkend="functions-jsonb-op-table">.)
376377
An example of creating an index with this operator class is:

‎src/include/catalog/pg_operator.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,11 +1806,11 @@ DESCR("greater than or equal");
18061806
DATA(insertOID=3246 ("@>"PGNSPPGUIDbff380238021632500jsonb_containscontselcontjoinsel ));
18071807
DESCR("contains");
18081808
DATA(insertOID=3247 ("?"PGNSPPGUIDbff3802251600jsonb_existscontselcontjoinsel ));
1809-
DESCR("exists");
1809+
DESCR("keyexists");
18101810
DATA(insertOID=3248 ("?|"PGNSPPGUIDbff380210091600jsonb_exists_anycontselcontjoinsel ));
1811-
DESCR("existsany");
1811+
DESCR("any key exists");
18121812
DATA(insertOID=3249 ("?&"PGNSPPGUIDbff380210091600jsonb_exists_allcontselcontjoinsel ));
1813-
DESCR("existsall");
1813+
DESCR("all keys exist");
18141814
DATA(insertOID=3250 ("<@"PGNSPPGUIDbff380238021632460jsonb_containedcontselcontjoinsel ));
18151815
DESCR("is contained by");
18161816
DATA(insertOID=3284 ("||"PGNSPPGUIDbff38023802380200jsonb_concat-- ));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp