Re: Adding constraint

Поиск
Список
Период
Сортировка
От Cornelia Boenigk
Тема Re: Adding constraint
Дата
Msg-id E183Qzw-0004B1-00@mrelayng0.kundenserver.de
обсуждение исходный текст
Ответ на Adding constraint  (Patrick Nelson <pnelson@neatech.com>)
Список pgsql-general
Hi Patrick

> Can you alter a table and drop a column?
Not with an ALTER TABLE statement. You have to create a new table without
this column, fill it with the existing data, drop the original table and
rename the newly created table to the original name.

CREATE TABLE newname AS SELECT <fieldlist> FROM originaltable ...
creates and fills a new table with the results of a SELECT.

> Can you add 'not null' to an existing column?
The 7.2 Documentation says:
In the current implementation of ADD COLUMN, default and NOT NULL clauses
for the new column are not supported.

Regards
Conni





В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Buffers and MacOS X
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Buffers and MacOS X