Creating then dropping primary key constraint - Mailing list pgsql-general

From Havasvölgyi Ottó
Subject Creating then dropping primary key constraint
Date
Msg-id 006201c5f934$1bcb2180$0200a8c0@OTTO
Whole thread Raw
In response to postgresql jdbc connect via hostname instead of just ip  (Jonathan Schreiter <jonathanschreiter@yahoo.com>)
List 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 by date:

Previous
From: Greg Stark
Date:
Subject: Re: Slow COUNT
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: 8.1, OID`s and plpgsql