Howto have a unique restraint on UPPER (textfield) - Mailing list pgsql-sql

Hi,

is there a way to define a unique restraint on UPPER (textfield)?

E.g.  
mytable (   name_id serial PRIMARY KEY,   name varchar(255),   UNIQUE ( upper (name) )
)

psql throws a syntax error because of the upper() function.

I need to prohibit that  2 of strings like   cow, Cow, CoW  appears in 
the name-column.


pgsql-sql by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Partitioning by letter question
Next
From: Joshua Tolley
Date:
Subject: Re: Howto have a unique restraint on UPPER (textfield)