Re: Case insensitive unique constraint

Поиск
Список
Период
Сортировка
Искать
От
Vivek Khera
Тема
Re: Case insensitive unique constraint
Дата
Msg-id
CCEE10D2-1332-45C7-B6F0-642F1EFDFE6C@khera.org
Ответ на
Список
Дерево обсуждения
To Postgres or not "Ted Slate" <tslateone@hotmail.com>
Re: To Postgres or not Tino Wildenhain <tino@wildenhain.de>
Re: To Postgres or not David Fetter <david@fetter.org>
Re: To Postgres or not Bob <luckyratfoot@gmail.com>
Re: To Postgres or not "Tadej Kanizar" <Tadej.Kanizar@sagit-server.com>
Re: To Postgres or not Vivek Khera <vivek@khera.org>
Re: To Postgres or not "Jim C. Nasby" <decibel@decibel.org>
Case insensitive unique constraint Rob Brenart <postgresql@oculardata.com>
Re: Case insensitive unique constraint Roman Neuhauser <neuhauser@sigpipe.cz>
Re: Case insensitive unique constraint Klint Gore <kg@kgb.une.edu.au>
Re: Case insensitive unique constraint Rob Brenart <postgresql@oculardata.com>
Re: Case insensitive unique constraint "John D. Burger" <john@mitre.org>
Re: Case insensitive unique constraint Andreas Seltenreich <andreas+pg@gate450.dyndns.org>
Re: Case insensitive unique constraint Vivek Khera <vivek@khera.org>
Re: To Postgres or not Neil Conway <neilc@samurai.com>
Re: To Postgres or not Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: To Postgres or not Tino Wildenhain <tino@wildenhain.de>
Re: To Postgres or not Scott Marlowe <smarlowe@g2switchworks.com>
Re: To Postgres or not Roman Neuhauser <neuhauser@sigpipe.cz>
Re: To Postgres or not Gregory Youngblood <gsyoungblood@mac.com>
Re: To Postgres or not merlyn@stonehenge.com (Randal L. Schwartz)

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
Дата:
От: Dinesh Pandey
Дата:
FAQ