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

From Hannu Krosing
Subject Re: error-free disabling of individual child partition
Date
Msg-id 1148393330.3798.18.camel@localhost.localdomain
Whole thread Raw
In response to Re: error-free disabling of individual child partition  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: error-free disabling of individual child partition  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: error-free disabling of individual child partition  (Csaba Nagy <nagy@ecircle-ag.com>)
List pgsql-hackers
Ühel kenal päeval, T, 2006-05-23 kell 09:37, kirjutas Tom Lane:
> "Zeugswetter Andreas DCP SD" <ZeugswetterA@spardat.at> writes:
> >>> We don't need a disinherit do we?
> 
> > 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 ?

Do you mean that it will be easy for the user to make errors, od do yuo
think that it will be hard to implement in a robust way ?

In the first case, I'd propose following syntax

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

With this syntax reparenting would need an explicit transaction and two
"ALTER TABLE ... ALTER INHERITS ..." commands, but it is (arguably)
harder to make mistakes.

-- 
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me:  callto:hkrosing
Get Skype for free:  http://www.skype.com




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: error-free disabling of individual child partition
Next
From: Tom Lane
Date:
Subject: Re: error-free disabling of individual child partition