Thread: alter table add column implementation undesirable?

alter table add column implementation undesirable?

From
Forest Wilkinson
Date:
A coworker told me that the postgres implementation of ALTER TABLE ADD
COLUMN creates an inefficient database.  He said it results in a table
whose new column is stored someplace other than the rest of the columns.
(A hidden auxiliary table?)  Is this true in postgres 6.5.3?  7.x?  Was it
ever true?

Forest Wilkinson



Re: alter table add column implementation undesirable?

From
Tom Lane
Date:
Forest Wilkinson <fspam@home.com> writes:
> A coworker told me that the postgres implementation of ALTER TABLE ADD
> COLUMN creates an inefficient database.

Dunno where he got that idea.

There are some problems lurking in ADD COLUMN when used on a table with
inheritance children --- the new column is added to the children too, as
it should be, but in an unexpected column position, which causes trouble
for pg_dump (a dump and reload will do the wrong thing).  Perhaps what
you heard is a garbled report of that issue.
        regards, tom lane