Re: error-free disabling of individual child partition - Mailing list pgsql-hackers

From Tom Lane
Subject Re: error-free disabling of individual child partition
Date
Msg-id 3484.1148393949@sss.pgh.pa.us
Whole thread Raw
In response to Re: error-free disabling of individual child partition  (Hannu Krosing <hannu@skype.net>)
List 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 by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: error-free disabling of individual child partition
Next
From: Richard Huxton
Date:
Subject: Re: Performance Issues