pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: marie.tuite@edisonaffiliates.com
Cc: Pgsql-Sql@Postgresql. Org <pgsql-sql@postgresql.org>
Subject: Re: drop constraint primary key
Date: Thu, 03 Oct 2002 13:09:38 -0400
Message-ID: <10247.1033664978@sss.pgh.pa.us> (raw)
In-Reply-To: <IGELKLINGDMODABPOOFEOEKNCIAA.marie.tuite@edisonaffiliates.com>
References: <IGELKLINGDMODABPOOFEOEKNCIAA.marie.tuite@edisonaffiliates.com>

"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



view thread (2+ messages)

Message-ID: <10247.1033664978@sss.pgh.pa.us>
Permalink:  ../10247.1033664978@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10247.1033664978@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marie.tuite@edisonaffiliates.com
  Subject: Re: drop constraint primary key
  In-Reply-To: <10247.1033664978@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox