Bruce Momjian writes:
> o ALTER TABLE ADD COLUMN column SET DEFAULT should fill existing
> rows with DEFAULT value or allow NULLs in existing rows
>
> My guess is that we will have to do spec behavior by default, and add a
> flag to allow NULLs in existing rows.
May I point you to the already existing set of commands that do exactly
what you want:
ALTER TABLE t1 ADD COLUMN name type;
ALTER TABLE t1 ALTER COLUMN name SET DEFAULT foo;
There's no reason to muck around with the spec here.
--
Peter Eisentraut peter_e@gmx.net