On Wed, May 7, 2014 at 1:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> No, wait, containment *doesn't* look into sub-objects:
>
> regression=# select * from j where f1 @> '{"foo": {"bar": "baz"}}';
> f1
> -------------------------
> {"foo": {"bar": "baz"}}
> (1 row)
>
> regression=# select * from j where f1 @> '{"bar": "baz"}';
> f1
> ----
> (0 rows)
Yes it does. It's just not intended to work like that. You have to
"give a path" to what you're looking for.
--
Peter Geoghegan