docs: add JSONB containment example of a key and empty object
Backpatch through 9.5
This commit is contained in:
parent
23d29cef93
commit
b292ee79a6
|
@ -291,6 +291,9 @@ SELECT '[1, 2, [1, 3]]'::jsonb @> '[[1, 3]]'::jsonb;
|
|||
|
||||
-- Similarly, containment is not reported here:
|
||||
SELECT '{"foo": {"bar": "baz"}}'::jsonb @> '{"bar": "baz"}'::jsonb; -- yields false
|
||||
|
||||
-- A top-level key and an empty object is contained:
|
||||
SELECT '{"foo": {"bar": "baz"}}'::jsonb @> '{"foo": {}}'::jsonb;
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
|
|
Loading…
Reference in New Issue