Re: error-free disabling of individual child partition
От
Simon Riggs
Тема
Re: error-free disabling of individual child partition
Дата
Msg-id
1148406539.2646.896.camel@localhost.localdomain
Ответ на
Список
Дерево обсуждения
Re: error-free disabling of individual child partition "Zeugswetter Andreas DCP SD" <ZeugswetterA@spardat.at>
Re: error-free disabling of individual child partition Simon Riggs <simon@2ndquadrant.com>
Re: error-free disabling of individual child partition Hannu Krosing <hannu@skype.net>
Re: error-free disabling of individual child partition Tom Lane <tgl@sss.pgh.pa.us>
Re: error-free disabling of individual child partition Hannu Krosing <hannu@skype.net>
Re: error-free disabling of individual child partition Csaba Nagy <nagy@ecircle-ag.com>
Re: error-free disabling of individual child partition Simon Riggs <simon@2ndquadrant.com>
Re: error-free disabling of individual child partition Hannu Krosing <hannu@skype.net>
Re: error-free disabling of individual child partition Simon Riggs <simon@2ndquadrant.com>
Re: error-free disabling of individual child partition Tom Lane <tgl@sss.pgh.pa.us>
Re: error-free disabling of individual child partition Simon Riggs <simon@2ndquadrant.com>
Re: error-free disabling of individual child partition Tom Lane <tgl@sss.pgh.pa.us>
Re: error-free disabling of individual child partition Simon Riggs <simon@2ndquadrant.com>
Re: error-free disabling of individual child partition Hannu Krosing <hannu@skype.net>
Re: error-free disabling of individual child partition Simon Riggs <simon@2ndquadrant.com>
Re: error-free disabling of individual child partition Tom Lane <tgl@sss.pgh.pa.us>
Re: error-free disabling of individual child partition Hannu Krosing <hannu@skype.net>
Re: error-free disabling of individual child partition Alvaro Herrera <alvherre@commandprompt.com>
Re: error-free disabling of individual child partition Tom Lane <tgl@sss.pgh.pa.us>
Re: error-free disabling of individual child partition Andrew Dunstan <andrew@dunslane.net>
Re: error-free disabling of individual child partition Simon Riggs <simon@2ndquadrant.com>
Re: error-free disabling of individual child partition Bruce Momjian <pgman@candle.pha.pa.us>
Re: error-free disabling of individual child partition Tom Lane <tgl@sss.pgh.pa.us>
Re: error-free disabling of individual child partition Simon Riggs <simon@2ndquadrant.com>
On Tue, 2006-05-23 at 13:17 -0400, Tom Lane wrote: > Simon Riggs writes: > > - ADD/DROP are opposites; you can use the other one to undo an action > > taken in haste, error etc > > It's not going to be that easy. What exactly will happen to the child > table's attislocal/attinhcount settings, and why, during ADD or DROP? Never is round here ;-) attislocal: If you set this to False, you wouldn't be able to set it back again. If you leave it as it is, you'd never be able to recursively drop a column. If you change it, you'll never be able to stop someone from dropping a previously defined local column. Proposal: 1. attislocal is not touched. That means if you want to create a new partition you do this: CREATE TABLE newChild () INHERITS (template); ... do some processing ... ALTER TABLE newChild ADD INHERITS parent; or this: CREATE TABLE newChild () INHERITS (parent); ALTER TABLE newChild DROP INHERITS parent; ... do some processing ... ALTER TABLE newChild ADD INHERITS parent; Neither of which I like. 2. attislocal is always set False when an appropriate ADD INHERITS is actioned. Not ever set back again. attinhcount changes as appropriate - up for ADDs and down for DROPs. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления