Re: [HACKERS] Adding type info etc for inheritance errmsg: "childtable is missing column ..."

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: [HACKERS] Adding type info etc for inheritance errmsg: "childtable is missing column ..."
Дата
Msg-id b08c94f9-048d-1f7c-c33b-b2486906861e@2ndquadrant.fr
обсуждение исходный текст
Ответ на Re: [HACKERS] Adding type info etc for inheritance errmsg: "child table is missing column ..."  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Adding type info etc for inheritance errmsg: "child table is missing column ..."  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] Adding type info etc for inheritance errmsg: "childtable is missing column ..."  (Ryan Murphy <ryanfmurphy@gmail.com>)
Список pgsql-hackers
On 01/07/2017 08:15 PM, Tom Lane wrote:
> Ryan Murphy <ryanfmurphy@gmail.com> writes:
>> I was hoping for
>> user=# alter table temp inherit entity;
>> ERROR:  child table is missing column "id" uuid default uuid_generate_v1mc()
>> Is there an easy way to get the string that includes all those additional
>> constraints/defaults etc?
> 
> No, and TBH I would vote strongly against including that much detail in
> this error message anyway.  That info could be indefinitely long, and it's
> not especially relevant to the stated error condition --- for example, the
> presence of a default is *not* relevant to whether the column matches the
> parent.  I'm okay with shoehorning column type into this message, but not
> much more than that.

I agree.

Perhaps the ERROR message should remain as is, and a DETAIL or HINT line
could be emitted with the entire column definition (or close to it)?
-- 
Vik Fearing                                          +33 6 46 75 15 36
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ryan Murphy
Дата:
Сообщение: Re: [HACKERS] Adding type info etc for inheritance errmsg: "childtable is missing column ..."
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Adding type info etc for inheritance errmsg: "child table is missing column ..."