array_to_json re-encodes ARRAY of json type

Поиск
Список
Период
Сортировка
От Itagaki Takahiro
Тема array_to_json re-encodes ARRAY of json type
Дата
Msg-id CAJW2+qcd3+aOqHhRN9nJdFAqKQi5CJBSoDbX4z=hJ9_mFJU7Cg@mail.gmail.com
обсуждение исходный текст
Ответы Re: array_to_json re-encodes ARRAY of json type
Список pgsql-hackers
If we pass an ARRAY of json type to array_to_json() function, the
function seems to
re-encode the JSON text. But should the following examples be the same result?
I'm not sure why we don't have a special case for json type in datum_to_json()
-- do we need to pass-through json types in it?

=# \x
=# SELECT '["A"]'::json,         array_to_json(ARRAY['A']),         array_to_json(ARRAY['"A"'::json]);
-[ RECORD 1 ]-+----------
json          | ["A"]
array_to_json | ["A"]
array_to_json | ["\"A\""]

-- 
Itagaki Takahiro


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

Предыдущее
От: Jan Urbański
Дата:
Сообщение: Re: Potential reference miscounts and segfaults in plpython.c
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Potential reference miscounts and segfaults in plpython.c