Alter table .. Add primary key

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Alter table .. Add primary key
Дата
Msg-id 1038499584.54963.4.camel@jester
обсуждение исходный текст
Список pgsql-hackers
When doing an alter table .. add primary key operation on columns which
are not marked as null, would it be appropriate to mark the primary key
columns not null?

This follows with create table auto-marking columns null for primary
keys.


rbt=# \d ar    Table "public.ar"Column | Type | Modifiers 
--------+------+-----------col    | r    | 

rbt=# alter table ar add primary key (col);
ERROR:  Existing attribute "col" cannot be a PRIMARY KEY because it is
not marked NOT NULL

-- 
Rod Taylor <rbt@rbt.ca>



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Auto Vacuum Daemon (again...)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: nested transactions