In PostgreSQL, both UNIQUE
indexes and UNIQUE
constraints can be used to enforce uniqueness on columns.
So you may be wondering; if that’s true, why have both? And are there any circumstances that we should choose one over the other?
Let’s find out.
Continue reading