Re: BETWEEN Node & DROP COLUMN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BETWEEN Node & DROP COLUMN
Дата
Msg-id 10896.1025879662@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:
> 1. I'm going to prevent people from dropping the last column in their table.
> I think this is the safest option.  How do I check if there's any other non
> dropped columns in a table?  Reference code anywhere?

You look through the Relation's tupledesc and make sure there's at least
one other non-dropped column.

> 2. What should I do about inheritance?  I'm going to implement it, but are
> there issues?  It will basically drop the column with the same name in all
> child tables.  Is that correct behaviour?

Yes, if the 'inh' flag is set.

If 'inh' is not set, then the right thing would be to drop the parent's
column and mark all the *first level* children's columns as
not-inherited.  How painful that would be depends on what representation
we choose for marking inherited columns, if any.

> 3. I am going to initially implement the patch to ignore the behaviour and
> do no dependency checking.  I will assume that Rod's patch will handle that
> without much trouble.

Yeah, Rod was looking ahead to DROP COLUMN.  I'm still working on his
patch (mostly the pg_constraint side) but should have it soon.
        regards, tom lane




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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Should next release by 8.0 (Was: Re: [GENERAL] I am
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Proposal: CREATE CONVERSION