Re: json function question

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dan S <strd911(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: json function question
Date: 2016-02-24 14:11:38
Message-ID: CAKFQuwak+MHMJ5cftMzRswUdZHDVtXzfuPsGWRdA7cG5WMKWGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday, February 24, 2016, Andrew Dunstan <andrew(at)dunslane(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Dunstan 2016-02-24 14:30:58 Re: json function question
Previous Message Andrew Dunstan 2016-02-24 10:31:45 Re: json function question