Re: Json support for array pseudotypes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Json support for array pseudotypes
Date: 2017-02-21 23:01:39
Message-ID: 16626.1487718099@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> writes:
> The attached tiny patch lets the to_json(b) routines convert objects
> with array pseudotypes to json{b}. The main impetus for this came from
> my trying to convert the annyarray columns in pg_stats to json and
> finding that they ended up as text instead of json arrays. This way
> to_json on these columns does what is expected.

Looks reasonable offhand, but maybe you should add some test cases?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2017-02-21 23:16:14 Re: Json support for array pseudotypes
Previous Message Tom Lane 2017-02-21 22:59:08 Re: safer node casting