Re: Json support for array pseudotypes

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

On 02/21/2017 06:01 PM, Tom Lane wrote:
> 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?
>
>

Yeah, I will. Not sure how to add a test for the RECORDARRAYOID case. We
don't seem to have any of those hanging around.

cheers

andrew

--

Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-02-22 00:58:31 Re: Proposal : For Auto-Prewarm.
Previous Message Tom Lane 2017-02-21 23:01:39 Re: Json support for array pseudotypes