Search Postgresql Archives

Creating then dropping primary key constraint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux