Message about not null in ALTER TABLE - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Message about not null in ALTER TABLE
Date
Msg-id 1011595495.18821.18.camel@cm-lcon1-40-151.chello.cl
Whole thread Raw
Responses Re: Message about not null in ALTER TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I think this is a bug in the error message:

alvherre=> alter table test add column b int not null;
ERROR:  Adding NOT NULL columns is not implemented.
    Add the column, then use ALTER TABLE ADD CONSTRAINT.

However, there is no way to add a NOT NULL constraint to an existing
column in a table, so the error message is misleading.

alvherre=> alter table test add constraint bnotnull not null b;
ERROR:  parser: parse error at or near "not"

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Siempre hay que alimentar a los dioses, aunque la tierra este seca"
(Orual)

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: 7.2b5 libpq++ include files broken?
Next
From: Chris Bainbridge
Date:
Subject: bug in contrib-global.mk