jsonb and where clause?

Поиск
Список
Период
Сортировка
От Bjorn T Johansen
Тема jsonb and where clause?
Дата
Msg-id 20171128091807.218d7809@pennywise-btj
обсуждение исходный текст
Ответы Re: jsonb and where clause?
Список pgsql-general
Hi.

Just starting to look at how to use jsonb columns and I have a question. I have found out that I can use the following
tosearch for a value inside
 
the jsonb column:

select * from orders where info ->> 'customer' = 'John Doe'    (where info is the jsonb column)


But what if the jsonb column contains an json array, how can I search then?

info -> [ { "customer" : "John Doe" } ]


btw, using PostgreSQL 9.6 but will be moving to 10 soon.


Regards,

BTJ


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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: ERROR: too many dynamic shared memory segments
Следующее
От: "Ivan E. Panchenko"
Дата:
Сообщение: Re: jsonb and where clause?