Re: How to search a string inside a json structure

Поиск
Список
Период
Сортировка
От Jason O'Donnell
Тема Re: How to search a string inside a json structure
Дата
Msg-id CAOYeSOfrPbi6WOUShwBt6D8mZA07KeKbyEMR-4iZEUCYS3LJtA@mail.gmail.com
обсуждение исходный текст
Ответ на How to search a string inside a json structure  (Sami Pietilä <sami.pietila@gmail.com>)
Ответы Re: How to search a string inside a json structure  (Sami Pietilä <sami.pietila@gmail.com>)
Список pgsql-general
Sami,

What version of postgres are you using?

There's some examples using GIN indexes for searching jsonb objects in the wiki: https://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9.4#JSONB_Binary_JSON_storage

Hope that helps,

On Mon, Nov 2, 2015 at 4:09 PM, Sami Pietilä <sami.pietila@gmail.com> wrote:
Hi,

I have a database with jsonb type of columns. Colums contain complex json structures. I would like to get all rows which contain a json where any of json's values matches to a given string (like %hello%).

How to create a postgre sql query to do this?

I guess postgre should traverse though each json structures while finding the string.

Thanks



--
Jason O'Donnell
Crunchy Data Solutions

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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Is there bigintarray?
Следующее
От: Emanuel Calvo
Дата:
Сообщение: Re: Approach to extract top records from table based upon aggregate