Search Postgresql Archives

Re: json query problem

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

 



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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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