When adding a unique constraint to a Postgres table does that imply that an index has also been added to that table?
Meaning, if I add a UNIQUE
constraint on a text
column, does that text column now have an index or does an index have to be added separately?
Yes.UNIQUE
constraints are implemented using a unique B-tree index in Postgres.
See:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With