Howto have a unique restraint on UPPER (textfield)

Поиск
Список
Период
Сортировка
От Andreas
Тема Howto have a unique restraint on UPPER (textfield)
Дата
Msg-id 4B64EA46.60605@gmx.net
обсуждение исходный текст
Ответы Re: Howto have a unique restraint on UPPER (textfield)  (Joshua Tolley <eggyknap@gmail.com>)
Re: Howto have a unique restraint on UPPER (textfield)  (msi77 <msi77@yandex.ru>)
Re: Howto have a unique restraint on UPPER (textfield)  (Yeb Havinga <yebhavinga@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Partitioning by letter question
Следующее
От: Joshua Tolley
Дата:
Сообщение: Re: Howto have a unique restraint on UPPER (textfield)