/** ALTER TABLE INHERIT** Add a parent to the child's parents. This verifies that all the columns and* check
constraintsof the parent appear in the child and that they have the* same data types and expressions.*/
static void
ATPrepAddInherit(Relation child_rel)
{ if (child_rel->rd_rel->reloftype) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("cannot change inheritance of typed table")));
}
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On 2015/06/10 20:18, Robert Haas wrote:
> /*
> * ALTER TABLE INHERIT
> *
> * Add a parent to the child's parents. This verifies that all the columns and
> * check constraints of the parent appear in the child and that they have the
> * same data types and expressions.
> */
> static void
> ATPrepAddInherit(Relation child_rel)
> {
> if (child_rel->rd_rel->reloftype)
> ereport(ERROR,
> (errcode(ERRCODE_WRONG_OBJECT_TYPE),
> errmsg("cannot change inheritance of typed table")));
> }
I agree with you.
Besides that, ISTM taht the error message is a little bit confusing
because I think typed tables cannot inherit. Maybe I'm missing
something though. Proposed patch attached.
Best regards,
Etsuro Fujita
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера