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

From Tom Lane
Subject Re: ALTER TABLE ADD COLUMN can't use NOT NULL?
Date
Msg-id 29788.1005616334@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER TABLE ADD COLUMN can't use NOT NULL?  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> As far as I am aware, we don't even support using ALTER TABLE ADD CONSRAINT
> to add a NOT NULL constraint, so I have no idea why the ERROR: message tells
> people to do that!!!

Not directly, but you can add a CHECK(foo NOT NULL) constraint.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: ALTER TABLE ADD COLUMN can't use NOT NULL?
Next
From: Stephan Szabo
Date:
Subject: Foreign key referential actions