Re: json function question - Mailing list pgsql-general

From David G. Johnston
Subject Re: json function question
Date
Msg-id CAKFQuwak+MHMJ5cftMzRswUdZHDVtXzfuPsGWRdA7cG5WMKWGw@mail.gmail.com
Whole thread Raw
In response to Re: json function question  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: json function question  (Andrew Dunstan <andrew@dunslane.net>)
Re: json function question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wednesday, February 24, 2016, Andrew Dunstan <andrew@dunslane.net> wrote:

Having json(b)_populate_record recursively process nested complex objects would be a large undertaking. One thing to consider is that json arrays are quite different from Postgres arrays: they are essentially one-dimensional heterogenous lists, not multi-dimensional homogeneous matrices. So while a Postgres array that's been converted to a json array should in principle be convertible back, an arbitrary json array could easily not be.


An arbitrary json array should be one-dimensional and homogeneous - seems like that should be easy to import.  The true concern is that not all PostgreSQL arrays are capable of being represented in json. 

I'd be happy with just accepting json arrays and ignoring complex and nested types.  While round-trip is nice externally supplied json that uses arrays should be something we can import directly.

David J.

pgsql-general by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: json function question
Next
From: Andrew Dunstan
Date:
Subject: Re: json function question