Open emaddoma opened 9 years ago
+1
Can probably be closed. Multi-column unique constraints are visible and can be created/deleted.
@qwesda Only the indices are displayed. You can create (and later drop) a unique index, but you can't drop a unique index that belongs to a unique constraint.
When you create a UNIQUE constraint (using ALTER TABLE ... ADD UNIQUE (...)
, PostgreSQL creates a CONSTRAINT and a UNIQUE INDEX. You can't drop the INDEX, you have to drop the CONSTRAINT.
If you just create a UNIQUE INDEX, PostgreSQL doesn't create a CONSTRAINT, and you can drop the index normally.
Both methods prevent duplicate entries, but only the former shows up in the pg_constraint column.
This is pretty confusing.
TLDR: Issue needs to stay open!
+1
Would be cool to support this