Re: DROP COLUMN misbehaviour with multiple inheritance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: DROP COLUMN misbehaviour with multiple inheritance
Date
Msg-id 21111.1032789666@sss.pgh.pa.us
Whole thread Raw
In response to Re: DROP COLUMN misbehaviour with multiple inheritance  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
Hannu Krosing <hannu@tm.ee> writes:
>> 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.

> Would it then not produce a situation, which can't be reproduced using
> just CREATEs ? i.e. same column in bot parent (p2.f1) and child (c.f1)
> but _not_ inherited ?? 

No, because the child will still have attinhcount > 0 until you drop the
last matching parent column.  attislocal is independent of the value of
attinhcount (that's why we need two fields).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ECPG
Next
From: Tom Lane
Date:
Subject: Re: Problem on PG7.2.2