On Mar 13, 2014, at 7:19, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> majid@apsalar.com wrote:
>>> Reproduction case:
>>>=20
>>> create table A(a int, b int, c int);
>>> create table B(a int, c int);
>>> alter table A inherit B;
>=20
>> I wonder if the real fix here is to have ALTER / INHERIT error out of
>> the columns in B are not a prefix of those in A.
>=20
> Years ago, we sweated quite a lot of blood to make these cases work.
> I'm not thrilled about throwing away all that effort because one =
person
> doesn't like the behavior.
That makes sense, but then it would make sense to document this behavior =
under ALTER TABLE ... INHERIT, and possibly change its behavior so it =
reorders the columns on the source database=92s data dictionary (I am =
not sure whether the logical column order has to match the physical =
order already embedded in the data files).
Thanks,
--
Fazal Majid
CTO, Apsalar Inc.