Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected
От | Bruce Momjian |
---|---|
Тема | Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected |
Дата | |
Msg-id | 200111282056.fASKu0706193@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
> 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. OK, so we will implement the spec, and allow people to avoid the double-disk space by doing the steps manually and skipping the UPDATE. Sounds good to me. TODO updated. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: