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: | 2006-05-23 14:08:49 |
Message-ID: | 1148393330.3798.18.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Ü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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-23 14:19:09 | Re: error-free disabling of individual child partition |
Previous Message | Tom Lane | 2006-05-23 13:37:56 | Re: error-free disabling of individual child partition |