Re: BUG #15940: json_populate_recordset fails with ERROR: record type has not been registered

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, yarexeray(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15940: json_populate_recordset fails with ERROR: record type has not been registered
Date: 2019-08-09 02:35:05
Message-ID: 20190809023505.GE3194@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message dsge94@outlook.com 2019-08-09 03:14:29 [HELP] Unable to initiate database cluster
Previous Message Michael Paquier 2019-08-09 02:24:05 Re: Error in COPY command with files over 1GB