Re: feature request - adding columns with default value

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: feature request - adding columns with default value
Дата
Msg-id 5503.1049467367@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: feature request - adding columns with default value  (Diogo de Oliveira Biazus <diogo@ikono.com.br>)
Список pgsql-general
Diogo de Oliveira Biazus <diogo@ikono.com.br> writes:
> Henrik Steffen wrote:
>> i would suggest to change the "alter table add column" function to
>> adding a default value while adding the column if this is possible
>> and if this minimizes "down-time".

> Maybe I'm wrong, but this feature was supported in 7.1,
> and it was removed in 7.2.

THe old implementation was really equivalent to "alter table add column"
followed by "set default", because it didn't touch the actual rows
(the implied new column stayed NULL).  That's not what the command
should do per SQL spec, so we took it out until we get around to
implementing the spec-compliant behavior.  The current behavior conforms
to spec as far as it goes.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: feature request - adding columns with default value
Следующее
От: Phil Mayers
Дата:
Сообщение: Badly planned queries with JOIN syntax