Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bumU9-0003Rc-MT for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Oct 2016 20:20:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bumU9-00064s-89 for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Oct 2016 20:20:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bumTU-0005KA-P4 for pgsql-bugs@postgresql.org; Thu, 13 Oct 2016 20:19:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bumTS-0003Oe-4r for pgsql-bugs@postgresql.org; Thu, 13 Oct 2016 20:19:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u9DKJQVV029673; Thu, 13 Oct 2016 16:19:26 -0400 From: Tom Lane To: joerg@bec.de cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14364: json_populate_record doesn't accept JSON arrays In-reply-to: <20161010205136.1397.51557@wrigleys.postgresql.org> References: <20161010205136.1397.51557@wrigleys.postgresql.org> Comments: In-reply-to joerg@bec.de message dated "Mon, 10 Oct 2016 20:51:36 -0000" Date: Thu, 13 Oct 2016 16:19:26 -0400 Message-ID: <29672.1476389966@sss.pgh.pa.us> X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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%40mail.gmail.com 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