Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 84B99476B1C for ; Thu, 3 Oct 2002 13:09:52 -0400 (EDT) Received: from sss.pgh.pa.us (sss-backup.pgh.pa.us [216.151.103.158]) by postgresql.org (Postfix) with ESMTP id 3CEA34769C2 for ; Thu, 3 Oct 2002 13:09:47 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g93H9chR010248; Thu, 3 Oct 2002 13:09:38 -0400 (EDT) To: marie.tuite@edisonaffiliates.com Cc: "Pgsql-Sql@Postgresql. Org" Subject: Re: drop constraint primary key In-reply-to: References: Comments: In-reply-to "Marie G. Tuite" message dated "Thu, 03 Oct 2002 11:06:14 -0500" Date: Thu, 03 Oct 2002 13:09:38 -0400 Message-ID: <10247.1033664978@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/44 X-Sequence-Number: 9762 "Marie G. Tuite" 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