Adding constraint - Mailing list pgsql-general

From Patrick Nelson
Subject Adding constraint
Date
Msg-id 4165C48DE9A0D211B6400800095C585F172E79@WASHINGTON
Whole thread Raw
List pgsql-general
I added a column to a table with
 ALTER TABLE company ADD varchar(8);

I had really wanted to have this set to not null but now I can't figure out
how to do that.  At first I thought that I could just drop the column... OK
that doesn't seem to be the way.

There is a fair amount of data in the tables and I could dump them and
rebuild it, but I just get the feeling that there is a easier way.  Am I
mad?  So here are the questions:

Can you alter a table and drop a column?

Can you add 'not null' to an existing column?

Or... I don't know... is there a better way?

pgsql-general by date:

Previous
From: Hunter Hillegas
Date:
Subject: Buffers and MacOS X
Next
From: Tom Lane
Date:
Subject: Re: Buffers and MacOS X