pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: easteregg@verfriemelt.org
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15999: jsonb_populate_record fails with array column
Date: Tue, 10 Sep 2019 10:38:01 -0400
Message-ID: <29816.1568126281@sss.pgh.pa.us> (raw)
In-Reply-To: <15999-26ff3cac50876c60@postgresql.org>
References: <15999-26ff3cac50876c60@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> 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





view thread (2+ messages)

Message-ID: <29816.1568126281@sss.pgh.pa.us>
Permalink:  ../29816.1568126281@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29816.1568126281@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, easteregg@verfriemelt.org
  Subject: Re: BUG #15999: jsonb_populate_record fails with array column
  In-Reply-To: <29816.1568126281@sss.pgh.pa.us>
  References: <15999-26ff3cac50876c60@postgresql.org> <29816.1568126281@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