Re: Primary Key

Поиск
Список
Период
Сортировка
От Henshall, Stuart - WCP
Тема Re: Primary Key
Дата
Msg-id E2870D8CE1CCD311BAF50008C71EDE8E01F7484C@MAIL_EXCHANGE
обсуждение исходный текст
Ответ на Primary Key  (denis@coralindia.com)
Список pgsql-novice
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)
>

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

Предыдущее
От: "devi"
Дата:
Сообщение: How to check success/failure of dml statements
Следующее
От: "Tony Griffiths(RA)"
Дата:
Сообщение: calling functions from embedded sql