From 2169e878c4a542e41a7d66cbb40d9c6bfde23f57 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 7 Oct 2015 09:06:49 -0400 Subject: docs: clarify JSONB operator descriptions No catalog bump as the catalog changes are for SQL operator comments. Backpatch through 9.5 --- doc/src/sgml/func.sgml | 16 ++++++++++------ doc/src/sgml/json.sgml | 5 +++-- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'doc/src') 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 @> 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: -- cgit v1.2.3