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

From Andrew Dunstan
Subject Re: error-free disabling of individual child partition
Date
Msg-id 44722127.7040108@dunslane.net
Whole thread Raw
In response to Re: error-free disabling of individual child partition  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Simon Riggs wrote:
>
> There is not currently any way to make an existing table become a child
> table of another table. I propose a TODO item to allow this:
>
>     ALTER TABLE childN INHERITS ( parent1, ... );
>
> This would only succeed if all of the columns that would have been
> inherited from all parent tables already exist with the same name and
> datatype, nullability and default values. Additional columns would be
> allowed in the child table.
>
> This would also allow you to use CREATE TABLE AS SELECT and then move
> that table underneath a parent.
>
> We don't need a disinherit do we?
>
>   

O, yes, I think we do. I can imagine that the ability to swap a table 
out of a set without deleting it could be very useful (e.g. you might 
move it in as a child of an archive table). These two would add markedly 
to the usefulness of inheritance as a partitioning mechanism.

cheers

andrew


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS
Next
From: Theo Schlossnagle
Date:
Subject: Re: Compiling PL/Perl and Pl/Python on x86_64