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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Bradley McLean" <brad(at)bradm(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ALTER TABLE ADD COLUMN can't use NOT NULL?
Date: 2001-11-13 01:52:14
Message-ID: 29788.1005616334@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2001-11-13 02:22:15 More FK patches
Previous Message Christopher Kings-Lynne 2001-11-13 01:44:16 Regression test database still stuffed