From: Michael Paquier <michael@paquier.xyz>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: yarexeray@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15940: json_populate_recordset fails with ERROR: record type has not been registered
Date: Fri, 9 Aug 2019 11:35:05 +0900
Message-ID: <20190809023505.GE3194@paquier.xyz> (raw)
In-Reply-To: <CAHyXU0yu3otAqneN=B+6oRXgDqEAqJt5EtYBn55vGX_PzBpj=w@mail.gmail.com>
References: <15940-2ab76dc58ffb85b6@postgresql.org>
<20190806073209.GI32256@paquier.xyz>
<CA+q6zcVYyjDEh9hkKi3eG81TBghMRjVySNA4gAsQU0q4gJPbFQ@mail.gmail.com>
<5154.1565120306@sss.pgh.pa.us>
<CAHyXU0yu3otAqneN=B+6oRXgDqEAqJt5EtYBn55vGX_PzBpj=w@mail.gmail.com>
On Tue, Aug 06, 2019 at 02:53:45PM -0500, Merlin Moncure wrote:
> For posterity I agree that OP was essentially exploiting undefined, or
> at least poorly defined, behavior. For my money, I'd advise using
> this function for cases where you don't want to use an in place type,
> just a column list:
If I were to change something here, that would be this error string
exposed to the user. With the current error, there is no real way
that the user knows what is wrong and why he/she should not do that.
Could it be possible to add some recommendation for example on top of
an error "cannot do that because blah"?
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, mmoncure@gmail.com, tgl@sss.pgh.pa.us, 9erthalion6@gmail.com, yarexeray@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15940: json_populate_recordset fails with ERROR: record type has not been registered
In-Reply-To: <20190809023505.GE3194@paquier.xyz>
* 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