Re: Diffrent column ordering after dump/restore tables with INHERITS - Mailing list pgsql-bugs

From Greg Stark
Subject Re: Diffrent column ordering after dump/restore tables with INHERITS
Date
Msg-id 407d949e0907050915g5ba96ecdt24e831276d8b7213@mail.gmail.com
Whole thread Raw
In response to Re: Diffrent column ordering after dump/restore tables with INHERITS  (Greg Stark <gsstark@mit.edu>)
List pgsql-bugs
On Sun, Jul 5, 2009 at 5:10 PM, Greg Stark<gsstark@mit.edu> wrote:
> On Sun, Jul 5, 2009 at 4:28 PM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
>> when i done dump->restore i
>>> have surprise,
>>> Column ordering was changed.
>>
>> This is not a bug, it's the intended behavior.
>
> I thought that was a bug

Rereading the thread I'll also mention that your fix causes a
different problem. Every column becomes marked as having being created
in the child table which wasn't the case originally.

If you later drop one of those columns from the parent table it's
supposed to cascade to the children but it won't because now postgres
thinks the child had those columns defined independently.

In the current setup we can get either the shared vs local definition
above correct or we can get the ordering correct. Getting both correct
would require a rework of either the way inheritance works or the way
column ordering works.

--
greg
http://mit.edu/~gsstark/resume.pdf

pgsql-bugs by date:

Previous
From: Greg Stark
Date:
Subject: Re: Diffrent column ordering after dump/restore tables with INHERITS
Next
From: Tom Lane
Date:
Subject: Re: Diffrent column ordering after dump/restore tables with INHERITS