Adding constraint

Поиск
Список
Период
Сортировка
Искать
От
Patrick Nelson
Тема
Adding constraint
Дата
Msg-id
4165C48DE9A0D211B6400800095C585F172E79@WASHINGTON
Список
Дерево обсуждения
Re: Adding constraint "Cornelia Boenigk" <poppcorn@cornelia-boenigk.de>
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 по дате отправления
От: Hunter Hillegas
Дата:
Сообщение: Buffers and MacOS X
От: Tom Lane
Дата:
Сообщение: Re: Buffers and MacOS X
FAQ