Remove uniqueness of index in PostgreSQL

后端 未结 5 1294
南笙
南笙 2021-01-31 06:56

In my PostgreSQL database I have a unique index created this way:

CREATE UNIQUE INDEX  ON  USING btree (my_column)
5条回答
  •  生来不讨喜
    2021-01-31 07:50

    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 DROP CONSTRAINT

    Edit: a related issue is described in this question

提交回复
热议问题