Re: Case insensitive unique constraint

Поиск
Список
Период
Сортировка
От Rob Brenart
Тема Re: Case insensitive unique constraint
Дата
Msg-id 42D6E00C.8080508@oculardata.com
обсуждение исходный текст
Ответ на Re: Case insensitive unique constraint  (Klint Gore <kg@kgb.une.edu.au>)
Ответы Re: Case insensitive unique constraint  ("John D. Burger" <john@mitre.org>)
Список pgsql-general
Klint Gore wrote:

>On Thu, 14 Jul 2005 02:14:16 -0500, Rob Brenart <postgresql@oculardata.com> 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?
>>
>>
>
>how about
>  create unique index tbl_iname_idx on tbl (lower(name_field))
>
>klint.
>
>
Not suprising when you get the same advice from a handful of people, but
this is exactly what I needed, thanks all.

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

Предыдущее
От: David Mitchell
Дата:
Сообщение: Re: Stopping Postgres
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Stopping Postgres