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

From Simon Riggs
Subject Re: error-free disabling of individual child partition
Date
Msg-id 1148396351.2646.829.camel@localhost.localdomain
Whole thread Raw
In response to Re: error-free disabling of individual child partition  (Csaba Nagy <nagy@ecircle-ag.com>)
Responses Re: error-free disabling of individual child partition
Re: error-free disabling of individual child partition
List pgsql-hackers
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? 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;

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [ADMIN] does wal archiving block the current client connection?
Next
From: Simon Riggs
Date:
Subject: Re: [ADMIN] does wal archiving block the current client