@@ -280,7 +280,7 @@ SELECT '[1, 2, 3]'::jsonb @> '[1, 2, 2]'::jsonb;
280
280
281
281
-- The object with a single pair on the right side is contained
282
282
-- within the object on the left side:
283
- SELECT '{"product": "PostgreSQL", "version": 9.4, "jsonb":true}'::jsonb @> '{"version":9.4}'::jsonb;
283
+ SELECT '{"product": "PostgreSQL", "version": 9.4, "jsonb": true}'::jsonb @> '{"version": 9.4}'::jsonb;
284
284
285
285
-- The array on the right side is <emphasis>not</> considered contained within the
286
286
-- array on the left, even though a similar array is nested within it:
@@ -291,6 +291,9 @@ SELECT '[1, 2, [1, 3]]'::jsonb @> '[[1, 3]]'::jsonb;
291
291
292
292
-- Similarly, containment is not reported here:
293
293
SELECT '{"foo": {"bar": "baz"}}'::jsonb @> '{"bar": "baz"}'::jsonb; -- yields false
294
+
295
+ -- A top-level key and an empty object is contained:
296
+ SELECT '{"foo": {"bar": "baz"}}'::jsonb @> '{"foo": {}}'::jsonb;
294
297
</programlisting>
295
298
296
299
<para>