Josh Berkus <josh(at)agliodbs(dot)com> writes:
> BTW, the above is basically Bricolage's problem ... they
> want only active user names to be unique.
Oh, why didn't you say so? Seems like the correct tool to solve that is
a partial unique index, not a constraint at all.
regards, tom lane