Re: jsonb existence queries are misimplemented by jsonb_ops

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: jsonb existence queries are misimplemented by jsonb_ops
Date: 2014-05-07 20:51:28
Message-ID: CAM3SWZTsvo-7vPieJCuWRHB6s7rzs6eVHEg5tuMBcVC4M4ixxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 7, 2014 at 1:47 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2014-05-07 20:51:57 Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Previous Message Josh Berkus 2014-05-07 20:48:18 Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers