Correctly handle array pseudotypes in to_json and to_jsonb
authorAndrew Dunstan <andrew@dunslane.net>
Wed, 22 Feb 2017 16:10:49 +0000 (11:10 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Wed, 22 Feb 2017 16:10:49 +0000 (11:10 -0500)
commit502a3832cc54c7115dacb8a2dae06f0620995ac6
tree60b620acde2bea72fabbdfad7ce02ea9ffcaec54
parent4c728f382970b6346142fe4409212063ee3e92dc
Correctly handle array pseudotypes in to_json and to_jsonb

Columns with array pseudotypes have not been identified as arrays, so
they have been rendered as strings in the json and jsonb conversion
routines. This change allows them to be rendered as json arrays, making
it possible to deal correctly with the anyarray columns in pg_stats.
src/backend/utils/adt/json.c
src/backend/utils/adt/jsonb.c
src/test/regress/expected/json.out
src/test/regress/expected/jsonb.out
src/test/regress/sql/json.sql
src/test/regress/sql/jsonb.sql