Re: Query on JSON field type

Поиск
Список
Период
Сортировка
От Mick
Тема Re: Query on JSON field type
Дата
Msg-id 35647d3a-891e-419c-8279-3e88499c09d9@googlegroups.com
обсуждение исходный текст
Ответ на Re: Query on JSON field type  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-novice
Thank you very much for your reply, Merlin :)

On Thursday, November 15, 2012 9:00:38 AM UTC-8, Merlin Moncure wrote:
> On Wed, Nov 14, 2012 at 4:27 PM, Mick wrote:
>
> > Hello,
>
> > my field is called Samples and the value is {"R":100, "S":101, "Q":102}.  how do I find all Samples for which "R" =
100?
>
> > Thank you in advance.
>
>
>
> for xml type we have xpath function for these type of queries.
>
> unfortunately, no analog for json type exists as of yet.  so, here our
>
> our options:
>
>
>
> *) pull to client side and filter there
>
> *) search textually (say, by regular expression) and hope for the best
>
> *) implement backend function in a language that speaks json, or can
>
> be extended to do so.  pl/v8 and p/python are both noteworthy, but
>
> almost all languages have json features of some kind.  your function
>
> will do simple test and return bool for example.
>
>
>
> merlin
>
>
>
>
>
> --
>
> Sent via pgsql-novice mailing list
>
> To make changes to your subscription:
>
> http://www.postgresql.org/mailpref/pgsql-novice



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

Предыдущее
От: "Cook, Brian - AIT"
Дата:
Сообщение: How to add User with Read Only Access [INTERNAL]
Следующее
От: Igor Romanchenko
Дата:
Сообщение: Re: How to add User with Read Only Access [INTERNAL]