A two-column UNIQUE rule checks the whole key tuple.
two-column key
Read tuple keys
The rule uses 2 key columns and finds 1 composite violation.
key columns=2
UNIQUE constraint examples are tiny finite table checks; SQL dialect completeness, index implementation, locking, optimizer behavior, product behavior, and performance claims are out of scope.
Both values must match
Rows collide only when every non-NULL component in the tuple matches.
whole tuple matches
Summary
Composite UNIQUE compares tuples, not columns one by one in isolation.