A statement that would violate it fails with an error, and inside a transaction that failure aborts the whole transaction.