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 447210E7.10904@dunslane.net
Whole thread Raw
In response to Re: error-free disabling of individual child partition tables  ("Jim C. Nasby" <jnasby@pervasive.com>)
Responses Re: error-free disabling of individual child partition  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
Jim C. Nasby wrote:
>
> BEGIN;
> -- Don't do the drop right now, because it might take awhile
> ALTER TABLE tablename RENAME TO delete_tablename;
> ALTER TABLE temporary_tablename RENAME TO tablename;
> COMMIT;
> DROP delete_tablename;
>
>   

What if there are dependencies? Might be better to have a view, which 
everything depends on, and change the view definition from one table to 
another back and forth.

cheers

andrew


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Update on sort-compression stuff
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS