You may be able to remove the unique CONSTRAINT, and not the INDEX itself.
Check your CONSTRAINTS via select * from information_schema.table_constraints;
Then if you find one, you should be able to drop it like:
ALTER TABLE <my_table> DROP CONSTRAINT <constraint_name>
Edit: a related issue is described in this question
Answer from user2062950 on Stack OverflowYou may be able to remove the unique CONSTRAINT, and not the INDEX itself.
Check your CONSTRAINTS via select * from information_schema.table_constraints;
Then if you find one, you should be able to drop it like:
ALTER TABLE <my_table> DROP CONSTRAINT <constraint_name>
Edit: a related issue is described in this question
Assume you have the following:
Indexes:
"feature_pkey" PRIMARY KEY, btree (id, f_id)
"feature_unique" UNIQUE, btree (feature, f_class)
"feature_constraint" UNIQUE CONSTRAINT, btree (feature, f_class)
To drop the UNIQUE CONSTRAINT, you would use ALTER TABLE:
ALTER TABLE feature DROP CONSTRAINT feature_constraint;
To drop the PRIMARY KEY, you would also use ALTER TABLE:
ALTER TABLE feature DROP CONSTRAINT feature_pkey;
To drop the UNIQUE [index], you would use DROP INDEX:
DROP INDEX feature_unique;