Re: jsonb existence queries are misimplemented by jsonb_ops
| От | Tom Lane |
|---|---|
| Тема | Re: jsonb existence queries are misimplemented by jsonb_ops |
| Дата | |
| Msg-id | 4616.1399495674@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | jsonb existence queries are misimplemented by jsonb_ops (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: jsonb existence queries are misimplemented by jsonb_ops
|
| Список | pgsql-hackers |
I wrote:
> Another idea would be to change the definition of the exists operator
> so that it *does* look into sub-objects. It seems rather random to me
> that containment looks into sub-objects but exists doesn't. However,
> possibly there are good reasons for the non-orthogonality.
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)
This is rather surprising in view of the way that section 8.14.4
goes on about nesting. But I guess the user-facing docs for jsonb
are in little better shape than the internal docs.
regards, tom lane
В списке pgsql-hackers по дате отправления: