Обсуждение: Re: Primary Key

Поиск
Список
Период
Сортировка

Re: Primary Key

От
"Henshall, Stuart - WCP"
Дата:
You need to create a unique index on the function lower (or upper) for your
field. eg:
CREATE UNIQUE INDEX example_index ON table_name (lower(text_column_name));
Hope this helps,
- Stuart

> -----Original Message-----
> From: denis@coralindia.com [mailto:denis@coralindia.com]
> Sent: 18 April 2002 06:32
> To: pgsql-novice@postgresql.org
> Subject: [NOVICE] Primary Key
>
>
> Hi all,
>
> In my table, a TEXT column is a unique column, by default it
> allows "denis"
> and "DENIS" to be entered in same column.
>
> I want the database to ignore CASE for considering uniqueness
> of the data.
>
> for e.g. once "Denis" is entered, it should not allow to
> enter "denis",
> "Denis", "DENIS" , "DeNiS" ...
>
> Thanks
>
> Denis
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to
> majordomo@postgresql.org)
>