Creating then dropping primary key constraint

Поиск
Список
Период
Сортировка
От Havasvölgyi Ottó
Тема Creating then dropping primary key constraint
Дата
Msg-id 006201c5f934$1bcb2180$0200a8c0@OTTO
обсуждение исходный текст
Ответ на postgresql jdbc connect via hostname instead of just ip  (Jonathan Schreiter <jonathanschreiter@yahoo.com>)
Список pgsql-general
Hi,

I noticed that when I create a primary key with ALTER TABLE ... ADD
CONSTRAINT ... PRIMARY KEY (...),
and then drop this constraint, then the "not null" modifier stays on the
column on which the primary key was defined although there were no
constraint on that column before.
Is this normal?
Pg 8.0.4

create table pritest(id integer);
\d pritest
alter table pritest add constraint pk_pritest primary key (id);
\d pritest
alter table pritest drop constraint pk_pritest;
\d pritest
drop table pritest;

Best regards,
Otto



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Slow COUNT
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: 8.1, OID`s and plpgsql