Message about not null in ALTER TABLE

From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Message about not null in ALTER TABLE
Date: 2002-01-21 06:44:55
Message-ID: 1011595495.18821.18.camel@cm-lcon1-40-151.chello.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Hans Plum 2002-01-21 23:26:51 Bug: Importing files of different sizes via psql -f
Previous Message pgsql-bugs 2002-01-21 04:49:45 Bug #564: CREATE TABLE with long table name and long serial column name can cause conflicting sequence naming