Re: How to search a string inside a json structure

Поиск
Список
Период
Сортировка
От Sami Pietilä
Тема Re: How to search a string inside a json structure
Дата
Msg-id CAN08J2ib3Pu88HSUiN4QLk3qSyP2LrkyZ+cPDu1H2Z5KVM0NBA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to search a string inside a json structure  ("Jason O'Donnell" <odonnelljp01@gmail.com>)
Ответы Re: How to search a string inside a json structure  (Vick Khera <vivek@khera.org>)
Список pgsql-general
Hi,

Thank you for reply!

I am using version 9.4.5.

Unfortunately I could not figure out how to select rows which, for example, contain following json: '{"a":"world","c":{"b":"helloworld"}}' by search with "hello" string.

I am trying to create a query which looks values in any field in JSON, "a" and "b" in this case (without knowing the names "a" and "b").

Thanks

2015-11-03 0:56 GMT+02:00 Jason O'Donnell <odonnelljp01@gmail.com>:
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,

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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: pg_archivecleanup not deleting anything?
Следующее
От: Vick Khera
Дата:
Сообщение: Re: How to search a string inside a json structure