pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: joerg@bec.de
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14364: json_populate_record doesn't accept JSON arrays
Date: Thu, 13 Oct 2016 16:19:26 -0400
Message-ID: <29672.1476389966@sss.pgh.pa.us> (raw)
In-Reply-To: <20161010205136.1397.51557@wrigleys.postgresql.org>
References: <20161010205136.1397.51557@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

joerg@bec.de writes:
> json_populate_record expects arrays in fields using the PG array literal
> syntax, it doesn't support JSON arrays. This is highly annoying as the JSON
> output functions like row_to_json will create JSON arrays, so round-trip
> fidelity is lost.

Yeah, this has come up before; one recent discussion is at
https://www.postgresql.org/message-id/flat/CAPpdape1SieipHCyZVbgtkb5NaD00FKGjiEoqfYj%3DPi%2B9ffisg%4...

Basically, these functions weren't built to process nested structures
recursively, and making them do so is a bit more work than anyone has
seen fit to put into them yet.  We'd accept a patch ...

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)

Message-ID: <29672.1476389966@sss.pgh.pa.us>
Permalink:  ../29672.1476389966@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29672.1476389966@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, joerg@bec.de
  Subject: Re: BUG #14364: json_populate_record doesn't accept JSON arrays
  In-Reply-To: <29672.1476389966@sss.pgh.pa.us>
  References: <20161010205136.1397.51557@wrigleys.postgresql.org> <29672.1476389966@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox