Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7hHU-0007q0-5V for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Sep 2019 14:38:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i7hHT-00007w-1X for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Sep 2019 14:38:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7hHS-00007N-PH for pgsql-bugs@lists.postgresql.org; Tue, 10 Sep 2019 14:38:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7hHQ-0005WS-Nk for pgsql-bugs@lists.postgresql.org; Tue, 10 Sep 2019 14:38:06 +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 x8AEc1u1029817; Tue, 10 Sep 2019 10:38:02 -0400 From: Tom Lane To: easteregg@verfriemelt.org cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15999: jsonb_populate_record fails with array column In-reply-to: <15999-26ff3cac50876c60@postgresql.org> References: <15999-26ff3cac50876c60@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 10 Sep 2019 09:55:06 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29815.1568126281.1@sss.pgh.pa.us> Date: Tue, 10 Sep 2019 10:38:01 -0400 Message-ID: <29816.1568126281@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > given the following simplified table with one row inserted: >> create table testa ( id serial, test text[] default > '{"test","test2"}'::text[] ); >> insert into testa values (default); > when we try to populate a record of testa type we run into trouble with > postgres in version 9.6.15 >> select jsonb_populate_record(null::testa , to_jsonb(testa)) FROM testa; > ERROR: 22P02: malformed array literal: "["test", "test2"]" > DETAIL: "[" must introduce explicitly-specified array dimensions. > LOCATION: array_in, arrayfuncs.c:269 Yeah, this is something we aren't going to risk changing pre-v10. cf35346e8 is what fixed it, but that was a pretty massive rewrite with bugs of its own, and IIRC it changed some other behaviors that were less obviously bugs than the case you're complaining of. regards, tom lane