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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers