diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index f8d9e460937..37e37672d42 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -10333,32 +10333,36 @@ table2-mapping
@>
jsonb
- Does the left JSON value contain within it the right value?
+ Does the left JSON value contain the right JSON
+ path/value entries at the top level?
'{"a":1, "b":2}'::jsonb @> '{"b":2}'::jsonb
<@
jsonb
- Is the left JSON value contained within the right value?
+ Are the left JSON path/value entries contained at the top level within
+ the right JSON value?
'{"b":2}'::jsonb <@ '{"a":1, "b":2}'::jsonb
?
text
- Does the key/element string exist within
- the JSON value?
+ Does the string exist as a top-level
+ key within the JSON value?
'{"a":1, "b":2}'::jsonb ? 'b'
?|
text[]
- Do any of these key/element strings exist?
+ Do any of these array strings
+ exist as top-level keys?
'{"a":1, "b":2, "c":3}'::jsonb ?| array['b', 'c']
?&
text[]
- Do all of these key/element strings exist?
+ Do all of these array strings exist
+ as top-level keys?
'["a", "b"]'::jsonb ?& array['a', 'b']
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';
The default GIN operator class for jsonb> supports queries with
- the @>>, ?>, ?&>
- and ?|> operators.
+ top-level key-exists operators ?>, ?&>
+ and ?|> operators and path/value-exists operator
+ @>>.
(For details of the semantics that these operators
implement, see .)
An example of creating an index with this operator class is:
diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index 26c9d4e4f7b..eec9c60c505 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -1806,11 +1806,11 @@ DESCR("greater than or equal");
DATA(insert OID = 3246 ( "@>" PGNSP PGUID b f f 3802 3802 16 3250 0 jsonb_contains contsel contjoinsel ));
DESCR("contains");
DATA(insert OID = 3247 ( "?" PGNSP PGUID b f f 3802 25 16 0 0 jsonb_exists contsel contjoinsel ));
-DESCR("exists");
+DESCR("key exists");
DATA(insert OID = 3248 ( "?|" PGNSP PGUID b f f 3802 1009 16 0 0 jsonb_exists_any contsel contjoinsel ));
-DESCR("exists any");
+DESCR("any key exists");
DATA(insert OID = 3249 ( "?&" PGNSP PGUID b f f 3802 1009 16 0 0 jsonb_exists_all contsel contjoinsel ));
-DESCR("exists all");
+DESCR("all keys exist");
DATA(insert OID = 3250 ( "<@" PGNSP PGUID b f f 3802 3802 16 3246 0 jsonb_contained contsel contjoinsel ));
DESCR("is contained by");
DATA(insert OID = 3284 ( "||" PGNSP PGUID b f f 3802 3802 3802 0 0 jsonb_concat - - ));