From: | Hannu Krosing <hannu(at)skype(dot)net> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Csaba Nagy <nagy(at)ecircle-ag(dot)com>, Zeugswetter Andreas DCP SD <ZeugswetterA(at)spardat(dot)at>, Andrew Dunstan <andrew(at)dunslane(dot)net>, April Lorenzen <outboundindex(at)gmail(dot)com>, postgres hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: error-free disabling of individual child partition |
Date: | 2006-05-23 15:19:57 |
Message-ID: | 1148397598.3798.20.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 15:59, kirjutas Simon Riggs:
> On Tue, 2006-05-23 at 16:29 +0200, Csaba Nagy wrote:
> > > ALTER TABLE childN ALTER INHERITS DROP (parent);
> > > ALTER TABLE childN ALTER INHERITS ADD (parent);
> >
> > Wouldn't it be possible to allow the ADD/DROP to happen in the same
> > statement, like:
> >
> > ALTER TABLE childN ALTER INHERITS DROP crt_parent ADD new_parent;
> >
> > or:
> >
> > ALTER TABLE childN ALTER INHERITS DROP crt_parent, ALTER INHERITS ADD
> > new_parent;
> >
> > That would still make it one statement, but more explicit. And it would
> > eliminate the need for parenthesis (I assume they were needed for
> > supplying more than 1 table to inherit/disinherit).
>
> Sounds good.
>
> Do we need the ALTER keyword?
Probably not.
> That isn't used anywhere apart from
> manipulating columns. i.e.
>
> ALTER TABLE childN INHERITS DROP old_parent;
> ALTER TABLE childN INHERITS ADD new_parent;
For me "DROP INHERITS oldtable" sounds better than "INHERITS DROP
oldtable" , but it may be just me :)
--
----------------
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
NOTICE: This communication contains privileged or other confidential
information. If you have received it in error, please advise the sender
by reply email and immediately delete the message and any attachments
without copying or disclosing the contents.
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2006-05-23 15:21:00 | Why is CVS server so slow? |
Previous Message | Simon Riggs | 2006-05-23 15:17:12 | Re: [ADMIN] does wal archiving block the current client |