Re: [HACKERS] Column ADDing issues

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Column ADDing issues
Date: 2000-01-26 00:10:04
Message-ID: 15550.948845404@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-01-26 00:14:29 Re: [HACKERS] --enable-debug
Previous Message Tom Lane 2000-01-25 23:55:59 Re: Happy column adding (was RE: [HACKERS] Happy column dropping)