Re: drop constraint primary key - Mailing list pgsql-sql

From Tom Lane
Subject Re: drop constraint primary key
Date
Msg-id 10247.1033664978@sss.pgh.pa.us
Whole thread Raw
In response to drop constraint primary key  ("Marie G. Tuite" <marie.tuite@edisonaffiliates.com>)
List pgsql-sql
"Marie G. Tuite" <marie.tuite@edisonaffiliates.com> writes:
> Running above, am trying to drop the primary key, but get the follwing
> error.
> project=# alter table class_teacher_rlt drop constraint
> class_teacher_rlt_pkey restrict;
> ERROR:  ALTER TABLE / DROP CONSTRAINT: class_teacher_rlt_pkey does not exist

In 7.2 DROP CONSTRAINT only works for CHECK-type constraints; you'll
have to drop the underlying index directly to get rid of a
primary-key-type constraint.

7.3 does allow DROP CONSTRAINT for this.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Marie G. Tuite"
Date:
Subject: drop constraint primary key
Next
From: Vincent-Olivier Arsenault
Date:
Subject: order by x DESC, y ASC indexing problem