Andrew Winkler <the_andrew_winkler(at)yahoo(dot)com> writes:> Can unique only reference columns?
Yup, that's what the SQL spec syntax says.
Instead, use CREATE UNIQUE INDEX.
regards, tom lane