Re: Can't drop constraint? - Mailing list pgsql-admin

From Tom Lane
Subject Re: Can't drop constraint?
Date
Msg-id 21933.1241547032@sss.pgh.pa.us
Whole thread Raw
In response to Re: Can't drop constraint?  (Carol Walter <walterc@indiana.edu>)
Responses Re: Can't drop constraint?  (Michael Monnerie <michael.monnerie@is.it-management.at>)
List pgsql-admin
Carol Walter <walterc@indiana.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

pgsql-admin by date:

Previous
From: Carol Walter
Date:
Subject: Re: Can't drop constraint?
Next
From: Michael Monnerie
Date:
Subject: Re: Can't drop constraint?