Creating a column interger with default to not null

From: Chris Barnes <compuguruchrisbarnes(at)hotmail(dot)com>
To: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Creating a column interger with default to not null
Date: 2010-09-24 15:05:43
Message-ID: BLU149-W22F7F504C6BBE98ADFA3CDD4620@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am confused with what this is telling me.
I have a table and I am trying to add a new column with constraint not null.

What am I missing?
Chris

pgdb001=> alter table schema.table add COLUMN column_name integer not null;
ERROR: column "column_name" contains null values

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2010-09-24 15:10:28 Re: Creating a column interger with default to not null
Previous Message Wang, Mary Y 2010-09-24 14:52:16 Trade Study on Oracle vs. PostgreSQL