Re: error-free disabling of individual child partition
- From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- To: Hannu Krosing <hannu(at)skype(dot)net>
- Cc: Zeugswetter Andreas DCP SD <ZeugswetterA(at)spardat(dot)at>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, April Lorenzen <outboundindex(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
- Subject: Re: error-free disabling of individual child partition
- Date: Tue, 23 May 2006 10:19:09 -0400
- Message-id: <3484(dot)1148393949(at)sss(dot)pgh(dot)pa(dot)us>
Hannu Krosing <hannu(at)skype(dot)net> writes:
> �hel kenal päeval, T, 2006-05-23 kell 09:37, kirjutas Tom Lane:
>>> I propose: ALTER TABLE childN INHERITS ();
>>> Thus I also think, that the list should be complete, and is not an
>>> addition to existing inheritance.
>>
>> Don't like that at all: it seems far too error-prone.
> In what way ?
It seems like it'd be awfully easy to unintentionally disinherit a child
table from a parent.
In a situation where you're only using single inheritance, it hardly
matters of course, but for multiple inheritance it just seems like a
way to shoot yourself in the foot. ISTM it'd be safer to have an
explicit disinherit-from-this-parent operation.
> In the first case, I'd propose following syntax
> ALTER TABLE childN ALTER INHERITS DROP (parent);
> ALTER TABLE childN ALTER INHERITS ADD (parent);
I could live with that. Do we need the parens?
regards, tom lane
Home |
Main Index |
Thread Index