Re: Can't drop constraint?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Carol Walter <walterc(at)indiana(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Can't drop constraint?
Date: 2009-05-05 18:10:32
Message-ID: 21933.1241547032@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Carol Walter <walterc(at)indiana(dot)edu> writes:
> I'm sorry, I should have included this. Here is what I'm seeing.
> This is PostgreSQL 8.3.6 on Solaris 10.

> km_tezt=# \d "tblPeople";
> Table "public.tblPeople"
> Column | Type |
> Modifiers
> ----------+------------------------
> +----------------------------------------------------------------
> peopleId | integer | not null default
> nextval('"tblPeople_peopleId_seq"'::regclass)
> fName | character varying(70) |
> mName | character varying(70) |
> lName | character varying(100) |
> ivlweb | boolean |
> cnsweb | boolean |
> Indexes:
> "primary_key_tblPeople" PRIMARY KEY, btree ("peopleId")
> "people_all_fields" UNIQUE, btree ("lName", "fName", "mName")

> km_tezt=# alter table "tblPeople" drop constraint "people_all_fields";
> ERROR: constraint "people_all_fields" does not exist

Apparently this is just an index, not a constraint (the difference being
that it was made with CREATE INDEX, not ALTER TABLE ADD CONSTRAINT).
Try

DROP INDEX people_all_fields;

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Monnerie 2009-05-06 05:45:56 Re: Can't drop constraint?
Previous Message Carol Walter 2009-05-05 17:13:02 Re: Can't drop constraint?