Case insensitive unique constraint - Mailing list pgsql-novice

From Michael Rowan
Subject Case insensitive unique constraint
Date
Msg-id CAL04MkkBW=u+GuqWB4K_GUZLn9YF18GCkv4_tp0Khb5SXSMuWw@mail.gmail.com
Whole thread Raw
Responses Re: Case insensitive unique constraint
List pgsql-novice
HI

I would like to do this:
ALTER TABLE a ADD CONSTRAINT a_unique UNIQUE lower(name)

This fails, syntax error near "lower"

This succeeds:
ALTER TABLE a ADD CONSTRAINT a_unique UNIQUE name

Can I get what I want, and if so, how?  Many thanks.

Mike

pgsql-novice by date:

Previous
From: James David Smith
Date:
Subject: Using indexes to speed up join?
Next
From: Tom Lane
Date:
Subject: Re: Case insensitive unique constraint