Re: Can't drop constraint?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Can't drop constraint?
Дата
Msg-id 21933.1241547032@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Can't drop constraint?  (Carol Walter <walterc@indiana.edu>)
Ответы Re: Can't drop constraint?  (Michael Monnerie <michael.monnerie@is.it-management.at>)
Список 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 по дате отправления:

Предыдущее
От: Carol Walter
Дата:
Сообщение: Re: Can't drop constraint?
Следующее
От: Michael Monnerie
Дата:
Сообщение: Re: Can't drop constraint?