Re: error-free disabling of individual child partition
- From: Hannu Krosing <hannu(at)skype(dot)net>
- To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- Cc: Zeugswetter Andreas DCP SD <ZeugswetterA(at)spardat(dot)at>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, April Lorenzen <outboundindex(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
- Subject: Re: error-free disabling of individual child partition
- Date: Tue, 23 May 2006 17:08:49 +0300
- Message-id: <1148393330(dot)3798(dot)18(dot)camel(at)localhost(dot)localdomain>
Ühel kenal päeval, T, 2006-05-23 kell 09:37, kirjutas Tom Lane:
> "Zeugswetter Andreas DCP SD" <ZeugswetterA(at)spardat(dot)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
Home |
Main Index |
Thread Index