2009/11/4 Alvaro Herrera <alvherre@commandprompt.com>:
> KaiGai Kohei wrote:
>
>> postgres=# SELECT * FROM t2;
>> ERROR: could not find inherited attribute "b" of relation "t3"
>>
>> Because t3.b is also inherited from the t2, but ALTER TABLE does not
>> care about multiple inherited columns well.
>>
>> I think we should not allow to rename a column with attinhcount > 1.
>
> I think we should fix ALTER TABLE to cope with multiple inheritance.
>
I'd be interested to see how this should work. Given KaiGai's
example, how would that be resolved? That column would already be
merged for the inheriting table, so would renaming it somehow unmerge
it? Given an insertion into t3 would propagate to both column b's in
table t1 and t2, and then renaming b in t1 wouldn't make sense. Or
would renaming it be prevented due to dependants? Or should t3's
inheritance of t1 and t2 implicitly bind t1's and t2's column b to one
another so that one affects the other? (i.e. renaming column b in t1
would also rename column b in t2, or both would require renaming
during the same transaction.)
...or something less confusing. :)
Thom