Re: [HACKERS] Column ADDing issues - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Column ADDing issues
Date
Msg-id 15550.948845404@sss.pgh.pa.us
Whole thread Raw
In response to Column ADDing issues  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: [HACKERS] Column ADDing issues
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Or maybe look at it this way:
> create table test1 (a int4);
> create table test2 (b int4) inherits (test1);
>                     ^ col #1          ^ col #2
> alter table test1* add column c int4;
>                               ^ col #3

> Everything has its order and it's not like the inheritance as such is
> broken.

Yes, a whole bunch of stuff is broken after this happens.  Go back and
consult the archives --- or maybe Chris Bitmead will fill you in; he's
got plenty of scars to show for this set of problems.  (All I recall
offhand is that pg_dump and reload can fail to generate a working
database.)  The bottom line is that it would be a lot nicer if column c
had the same column position in both the parent table and the child
table(s).

I suggest you be very cautious about messing with ALTER TABLE until you
understand why inheritance makes it such a headache ;-)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Happy column adding (was RE: [HACKERS] Happy column dropping)
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] --enable-debug