Re: 9.3: bug related to json

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 9.3: bug related to json
Дата
Msg-id 29767.1424870733@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 9.3: bug related to json  (Torsten Förtsch <torsten.foertsch@gmx.net>)
Список pgsql-general
=?UTF-8?B?VG9yc3RlbiBGw7ZydHNjaA==?= <torsten.foertsch@gmx.net> 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


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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Sequences not moved to new tablespace
Следующее
От: Felix Ivan Romero Rodríguez
Дата:
Сообщение: utf8 issues