Correctly handle array pseudotypes in to_json and to_jsonb
Andrew Dunstan <andrew@dunslane.net>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/jsonb.c | modified | +3 −2 |
| src/backend/utils/adt/json.c | modified | +3 −2 |
| src/test/regress/expected/jsonb.out | modified | +9 −0 |
| src/test/regress/expected/json.out | modified | +9 −0 |
| src/test/regress/sql/jsonb.sql | modified | +6 −0 |
| src/test/regress/sql/json.sql | modified | +6 −0 |