Обсуждение: alter table questions

Поиск
Список
Период
Сортировка

alter table questions

От
"mike"
Дата:
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

От
Peter Eisentraut
Дата:
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