Re: jsonb existence queries are misimplemented by jsonb_ops - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: jsonb existence queries are misimplemented by jsonb_ops
Date
Msg-id CAM3SWZTsvo-7vPieJCuWRHB6s7rzs6eVHEg5tuMBcVC4M4ixxQ@mail.gmail.com
Whole thread Raw
In response to Re: jsonb existence queries are misimplemented by jsonb_ops  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: jsonb existence queries are misimplemented by jsonb_ops
Re: jsonb existence queries are misimplemented by jsonb_ops
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Next
From: Petr Jelinek
Date:
Subject: Re: bgworker crashed or not?