Re: ADD/DROP INHERITS
| От | Tom Lane |
|---|---|
| Тема | Re: ADD/DROP INHERITS |
| Дата | |
| Msg-id | 28127.1149781737@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: ADD/DROP INHERITS (Greg Stark <gsstark@mit.edu>) |
| Ответы |
Re: ADD/DROP INHERITS
|
| Список | pgsql-hackers |
Greg Stark <gsstark@mit.edu> writes:
> Come to think of it it's pretty strange that you can drop an inherited
> constraint from a child. And doing an experiment it seems you can also DROP
> NOT NULL on a child which is also pretty strange.
Yeah. I think we had agreed that this is a bug. Note the TODO entries:
o Prevent parent tables from altering or dropping constraints like CHECK that are inherited by child tables unless
CASCADE is usedo %Prevent child tables from altering or dropping constraints like CHECK that were inherited
fromthe parent table
> I don't see how to block these operations though unless we either search
> parent classes for constraints to check at run-time or add additional
> dependency records to block dropping these things.
The implementation I had in mind was to add columns similar to attinhcount
and attislocal to pg_constraint.
regards, tom lane
В списке pgsql-hackers по дате отправления: