Re: Why no jsonb_exists_path()?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why no jsonb_exists_path()?
Дата
Msg-id 15089.1433875210@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Why no jsonb_exists_path()?  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Why no jsonb_exists_path()?
Список pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> I'm noticing a feature gap for JSONB operators; we have no way to do this:

> jsonb_col ? ARRAY['key1','key2','key3']

> ... that is, there is no way for us to check for key existence in an
> indexable fashion.  Given that @> already can check the whole path
> including the value, is there some challenge to stopping just short of
> the value I'm not seeing?  Or is this just a "didn't get to it yet" issue?

Hm, well, the jsonb_path_ops opclass couldn't do it, because what it
indexes is hashes that include the value.  I suppose jsonb_ops could
look for entries that match all of the keys and then see if the ordering
is correct.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Why no jsonb_exists_path()?
Следующее
От: David Steele
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add pg_audit, an auditing extension