Re: ALTER TABLE ADD COLUMN can't use NOT NULL?

Поиск
Список
Период
Сортировка
От darcy@druid.net (D'Arcy J.M. Cain)
Тема Re: ALTER TABLE ADD COLUMN can't use NOT NULL?
Дата
Msg-id 20011113123644.79B531A6B@druid.net
обсуждение исходный текст
Ответ на ALTER TABLE ADD COLUMN can't use NOT NULL?  (Bradley McLean <brad@bradm.net>)
Список pgsql-hackers
Thus spake Bradley McLean
> a123=# alter table test add test1 int4 not null;
> ERROR:  Adding NOT NULL columns is not implemented.
>         Add the column, then use ALTER TABLE ADD CONSTRAINT.
> a123=# alter table test add test1 int4 null;
> ALTER
> a123=#
> 
> I'm pretty sure the first one used to work just fine.  Is this
> intentional breakage?

Are you sure?  I seem to recall that it was accepted but the constraint
was simply ignored.  I thought that the recent change was just that it
rejected the attempt.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


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

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Quick question
Следующее
От: Brent Verner
Дата:
Сообщение: Re: Quick question