UNIQUE indexes are constraints in disguise
A UNIQUE constraint is implemented as a unique index. You can create unique indexes directly with CREATE UNIQUE INDEX — useful for adding uniqueness to existing columns or scoping uniqueness with a partial WHERE.
Partial indexes — index only what you query
A partial index includes a WHERE clause: only rows matching the predicate are indexed. Smaller index, faster to maintain, often dramatically faster for queries that match the same predicate. Classic uses: index only active rows, only pending orders, only non-deleted records.
Combining partial + unique
"Email must be unique among non-deleted users" is a partial unique index — a one-line solution to a problem that's annoying to enforce in the application.