[GENERAL] Unexpected syntax error when using JSON - in 9.3.5

2014-09-23 Thread Seamus Abshere
hi all, This part looks correct and expected: $ psql foobar psql (9.3.5) Type help for help. foobar=# select coalesce('{}'::json-'a', 1); ERROR: COALESCE types json and integer cannot be matched LINE 1: select coalesce('{}'::json-'a', 1); ^ but

Re: [GENERAL] Unexpected syntax error when using JSON - in 9.3.5

2014-09-23 Thread David G Johnston
seamusabshere wrote hi all, This part looks correct and expected: $ psql foobar psql (9.3.5) Type help for help. foobar=# select coalesce('{}'::json-'a', 1); ERROR: COALESCE types json and integer cannot be matched LINE 1: select coalesce('{}'::json-'a', 1);

Re: [GENERAL] Unexpected syntax error when using JSON - in 9.3.5

2014-09-23 Thread Tom Lane
Seamus Abshere sea...@abshere.net writes: foobar=# select coalesce('{}'::json-'a', 1); ERROR: COALESCE types json and integer cannot be matched Right ... but check it out when I use a string instead of an integer: foobar=# select coalesce('{}'::json-'a', 'b'); ERROR: invalid input syntax