Re: Howto have a unique restraint on UPPER (textfield)

Поиск
Список
Период
Сортировка
От msi77
Тема Re: Howto have a unique restraint on UPPER (textfield)
Дата
Msg-id 16031264924937@webmail101.yandex.ru
обсуждение исходный текст
Ответ на Howto have a unique restraint on UPPER (textfield)  (Andreas <maps.on@gmx.net>)
Список pgsql-sql
Hi,

I think you need CS collation and UNIQUE(name).

> 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. 
> -- 
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) 
> To make changes to your subscription: 
> http://www.postgresql.org/mailpref/pgsql-sql 
> 

Здесь спама нет http://mail.yandex.ru/nospam/sign


В списке pgsql-sql по дате отправления:

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