Re: [HACKERS] Json support for array pseudotypes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Json support for array pseudotypes
Date
Msg-id 16626.1487718099@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] Json support for array pseudotypes  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Responses Re: [HACKERS] Json support for array pseudotypes
List pgsql-hackers
Andrew Dunstan <andrew.dunstan@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] safer node casting
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] Json support for array pseudotypes