Michael Rowan <michael(dot)rowan3(at)gmail(dot)com> writes:
> I would like to do this:
> ALTER TABLE a ADD CONSTRAINT a_unique UNIQUE lower(name)
You can't get to that through CONSTRAINT syntax, but you can just
create a unique index directly:
CREATE UNIQUE INDEX a_unique ON a (lower(name))
regards, tom lane