Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: error-free disabling of individual child partition


  • From: Simon Riggs <simon(at)2ndquadrant(dot)com>
  • To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
  • Cc: Hannu Krosing <hannu(at)skype(dot)net>, 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: Tue, 23 May 2006 15:59:11 +0100
  • Message-id: <1148396351(dot)2646(dot)829(dot)camel(at)localhost(dot)localdomain>

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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group