Re: error-free disabling of individual child partition

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: error-free disabling of individual child partition
Дата
Msg-id 3484.1148393949@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: error-free disabling of individual child partition  (Hannu Krosing <hannu@skype.net>)
Список pgsql-hackers
Hannu Krosing <hannu@skype.net> writes:
> Ühel kenal päeval, T, 2006-05-23 kell 09:37, kirjutas Tom Lane:
>>> I propose: ALTER TABLE childN INHERITS ();
>>> Thus I also think, that the list should be complete, and is not an
>>> addition to existing inheritance.
>> 
>> Don't like that at all: it seems far too error-prone.

> In what way ?

It seems like it'd be awfully easy to unintentionally disinherit a child
table from a parent.

In a situation where you're only using single inheritance, it hardly
matters of course, but for multiple inheritance it just seems like a
way to shoot yourself in the foot.  ISTM it'd be safer to have an
explicit disinherit-from-this-parent operation.

> In the first case, I'd propose following syntax

> ALTER TABLE childN ALTER INHERITS DROP (parent);
> ALTER TABLE childN ALTER INHERITS ADD (parent);

I could live with that.  Do we need the parens?
        regards, tom lane


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