Search Postgresql Archives

Re: How to search a string inside a json structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>:
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,


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux