=?UTF-8?B?VG9yc3RlbiBGw7ZydHNjaA==?= <[email protected]> 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),
> ('{"a":"b"}'::json ->> 'a')) t;
> column1
> ---------
> "b"
> b
As of 9.4, there's a function json_array_elements_text()
which does what I think you're looking for.
regards, tom lane
--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general