Thread: alter table questions

alter table questions

From
"mike"
Date:
in the current postgres docs alter table is as follows to add a column,
 
ALTER TABLE distributors ADD COLUMN address VARCHAR(30);
why is it when I add a column with a defualt value the default value is ignored?

ALTER TABLE ind_personal ADD COLUMN reg_security CHAR(3) NOT NULL DEFAULT '0';

Mike  

Re: alter table questions

From
Peter Eisentraut
Date:
mike writes:

> in the current postgres docs alter table is as follows to add a column,
>
> ALTER TABLE distributors ADD COLUMN address VARCHAR(30);
>
> why is it when I add a column with a defualt value the default value is ignored?
> ALTER TABLE ind_personal ADD COLUMN reg_security CHAR(3) NOT NULL DEFAULT '0';

Because no one has ever come around to implementing it.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter