Re: Case insensitive unique constraint

Поиск
Список
Период
Сортировка
От Vivek Khera
Тема Re: Case insensitive unique constraint
Дата
Msg-id CCEE10D2-1332-45C7-B6F0-642F1EFDFE6C@khera.org
обсуждение исходный текст
Ответ на Case insensitive unique constraint  (Rob Brenart <postgresql@oculardata.com>)
Список pgsql-general
On Jul 14, 2005, at 3:14 AM, Rob Brenart wrote:

> I have a simple table to store account names... I want each name to
> be unique in a case insensitive manner... but I want the case the
> user enters to be remembered so I can't do a simple lower() on the
> data's way in.
>
> Is there an easy way to go about this? Am I about to write my first
> server side function for postgresql?

create your unique index using the lower() function.

and don't steal threads to start a new one (ie, replying then just
changing the subject)

Vivek Khera, Ph.D.
+1-301-869-4449 x806



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to create unique constraint on NULL columns
Следующее
От: "Dinesh Pandey"
Дата:
Сообщение: Postgres for Fedora Core 2 OS ****************