Re: [GENERAL] 9.3: bug related to json

2015-02-25 Thread Tom Lane
=?UTF-8?B?VG9yc3RlbiBGw7ZydHNjaA==?= writes: > On 25/02/15 07:34, David G Johnston wrote: >> Torsten Förtsch wrote >>> Is there anything similar for JSON scalars? >> IDK, but have you tried "::text"? > yes. Here is the difference > select * from (values (('{"a":"b"}'::json -> 'a')::text), >

Re: [GENERAL] 9.3: bug related to json

2015-02-25 Thread Torsten Förtsch
On 25/02/15 07:34, David G Johnston wrote: > Torsten Förtsch wrote >> > Is there anything similar for JSON scalars? > IDK, but have you tried "::text"? yes. Here is the difference select * from (values (('{"a":"b"}'::json -> 'a')::text), ('{"a":"b"}'::json ->> 'a')) t; col

Re: [GENERAL] 9.3: bug related to json

2015-02-25 Thread Torsten Förtsch
On 25/02/15 07:22, David G Johnston wrote: > I'm doubting you intended to join a bunch of commas using the field value as > the delimiter...methinks your got the argument order reversed for > string_agg. OMG, I am so stupid. Thanks. -- Sent via pgsql-general mailing list (pgsql-general@postgres

Re: [GENERAL] 9.3: bug related to json

2015-02-24 Thread David G Johnston
Torsten Förtsch wrote > Is there anything similar for JSON scalars? IDK, but have you tried "::text"? David J. -- View this message in context: http://postgresql.nabble.com/9-3-bug-related-to-json-tp5839261p5839311.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Re: [GENERAL] 9.3: bug related to json

2015-02-24 Thread David G Johnston
Torsten Förtsch wrote > cross join lateral ( > select string_agg(', ', syms.sym ->> 'x') as xx >from json_array_elements(t.el -> 's') > syms(sym) I'm doubting you intended to join a bunch of commas using the field value as the delimiter...methinks your got the argument or