| От | Tom Lane |
|---|---|
| Тема | Re: feature request - adding columns with default value |
| Дата | |
| Msg-id | 7078.1049471931@sss.pgh.pa.us обсуждение |
| Ответ на | Re: feature request - adding columns with default value (Stephan Szabo <sszabo@megazone23.bigpanda.com>) |
| Ответы |
Re: feature request - adding columns with default value
|
| Список | pgsql-general |
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> SET DEFAULT just sets the default up but also doesn't modify the actual rows
> stored on disk. Presumably SET DEFAULT should probably do the update,
No, it shouldn't; the existing behavior is per spec. SET DEFAULT just
changes the default for future insertions, it's not supposed to touch
the present table contents.
ALTER TABLE ADD COLUMN with a default clause *is* supposed to fill all
rows of the table with the default. The reason we reject it is we don't
have that behavior implemented.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера