Re: BETWEEN Node & DROP COLUMN
| От | Tom Lane |
|---|---|
| Тема | Re: BETWEEN Node & DROP COLUMN |
| Дата | |
| Msg-id | 10705.1025878493@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: BETWEEN Node & DROP COLUMN ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>) |
| Список | pgsql-hackers |
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
>> What happens if I drop an inherited column in a child table? Maybe it
>> works, but what happens when I SELECT the column in the parent table?
> Well, what happens if you rename a column in a child table? Same problem?
Ideally we should disallow both of those, as well as cases like
changing the column type.
It might be that we can use the pg_depend stuff to enforce this (by
setting up dependency links from child to parent). However that would
introduce a ton of overhead in a regular DROP TABLE, and you'd still
need specialized code to prevent the RENAME case (pg_depend wouldn't
care about that). I'm thinking that it's worth adding an attisinherited
column to pg_attribute to make these rules easy to enforce.
regards, tom lane
В списке pgsql-hackers по дате отправления: