Search Postgresql Archives

DROP INDEX CASCADE doesn't want to drop unique constraints?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On trying to drop an index named "employer_employerid_key" which supports a unique constraint:

    "employer_employerid_key" UNIQUE CONSTRAINT, btree (employerid)

I get this error:

ERROR:  cannot drop index employer_employerid_key because constraint employer_employerid_key on table employer requires it
HINT:  You can drop constraint employer_employerid_key on table employer instead.

I'm using the CASCADE and IF EXISTS arguments and the docs say nothing about any special cases (https://www.postgresql.org/docs/9.3/static/sql-dropindex.html). This is with PostgreSQL 9.3.15. 

The actual command is:

drop index if exists employer_employerid_key cascade;

Any ideas if this is normal or why it happens?




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux