Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns - Mailing list pgsql-bugs

From Fazal Majid
Subject Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns
Date
Msg-id B7263FFC-3726-4DCD-9293-B4D700893D63@apsalar.com
Whole thread Raw
In response to Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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.

pgsql-bugs by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: need information licenses costs.
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns