pgsql: Correctly handle array pseudotypes in to_json and to_jsonb

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Correctly handle array pseudotypes in to_json and to_jsonb
Date: 2017-02-22 16:14:12
Message-ID: E1cgZYS-0000oR-Af@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/502a3832cc54c7115dacb8a2dae06f0620995ac6

Modified Files
--------------
src/backend/utils/adt/json.c | 5 +++--
src/backend/utils/adt/jsonb.c | 5 +++--
src/test/regress/expected/json.out | 9 +++++++++
src/test/regress/expected/jsonb.out | 9 +++++++++
src/test/regress/sql/json.sql | 6 ++++++
src/test/regress/sql/jsonb.sql | 6 ++++++
6 files changed, 36 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-02-22 20:04:38 pgsql: Fix contrib/pg_trgm's extraction of trigrams from regular expres
Previous Message Robert Haas 2017-02-22 06:55:14 pgsql: Pass the source text for a parallel query to the workers.