En 23 Sep 2002 10:23:06 +0200
Hannu Krosing <hannu@tm.ee> escribió:
> Tom Lane kirjutas P, 22.09.2002 kell 18:56:
> > It seems to me that DROP ONLY should set attislocal true on each child
> > for which it decrements the inherit count, whether the count reaches
> > zero or not.
>
> This would not be what I e'd expect - if c inherited f1 twice and then
> one of the parents disinherits it, then it would still be inherited from
> the other parent
The problem with this is that two sequences of commands only differing
in the ordering of two clauses give different result:
create table p1 (f1 int, f2 int);
create table p2 (f1 int, f2 int);
create table c () inherits (p1, p2);
alter table only p1 drop column f1;
alter table p2 drop column f1;
create table p1 (f1 int, f2 int);
create table p2 (f1 int, f2 int);
create table c () inherits (p1, p2);
alter table p2 drop column f1;
alter table only p1 drop column f1;
The former drops f1 from c, while the latter does not. It's
inconsistent.
--
Alvaro Herrera (<alvherre[a]atentus.com>)
"La Primavera ha venido. Nadie sabe como ha sido" (A. Machado)