Re: How to search a string inside a json structure

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: How to search a string inside a json structure
Дата
Msg-id CALd+dccU-2XjsL9km1aiLg6UYJz5mceyAs9Df6Zm255wpJV8mQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: 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  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general

On Tue, Nov 3, 2015 at 10:07 AM, Sami Pietilä <sami.pietila@gmail.com> wrote:
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.

cast the field to a text:

select * from t where myfield::text like '%hello%';

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

Предыдущее
От: Sami Pietilä
Дата:
Сообщение: Re: How to search a string inside a json structure
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Approach to extract top records from table based upon aggregate