Re: json query problem

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: json query problem
Дата
Msg-id 52C5DC67.7020906@gmail.com
обсуждение исходный текст
Ответ на json query problem  ("john.tiger" <john.tigernassau@gmail.com>)
Список pgsql-general
On 01/02/2014 11:19 AM, john.tiger wrote:
> trying to select a row of json type returning the entire json record
>
> table users  id, jsondata
> jsondata has {"username":"jdoe", ....}
>
> select json_to_row from users where jsondata->"username" = "jdoe";
>     fails on operator -> unknown
>
> using debian testing with postgresql backport ppa
> psql:  9.3.2   server 9.2.6
>
> do I need a higher server version ?  is there a 9.3 server available for
> debian ?
>

Yes, you need 9.3+ to get the -> operator.

FYI, a good way to determine this is to go to the section you want, in
this case:

http://www.postgresql.org/docs/9.2/interactive/functions-json.html

Then look at the top of page. There will be links to other versions of
the Postgres for which this documentation applies. By moving
backward/forward you can see when features appear or are changed.

>
>


--
Adrian Klaver
adrian.klaver@gmail.com


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

Предыдущее
От: "Joshua D. Burns"
Дата:
Сообщение: Re: json query problem
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: Refresh Materialized View