Re: ALTER TABLE ADD COLUMN can't use NOT NULL? - Mailing list pgsql-hackers

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: ALTER TABLE ADD COLUMN can't use NOT NULL?
Date
Msg-id 20011113123644.79B531A6B@druid.net
Whole thread Raw
In response to ALTER TABLE ADD COLUMN can't use NOT NULL?  (Bradley McLean <brad@bradm.net>)
List 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 by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Quick question
Next
From: Brent Verner
Date:
Subject: Re: Quick question