Re: Primary Key - Mailing list pgsql-novice

From Henshall, Stuart - WCP
Subject Re: Primary Key
Date
Msg-id E2870D8CE1CCD311BAF50008C71EDE8E01F7484C@MAIL_EXCHANGE
Whole thread Raw
In response to Primary Key  (denis@coralindia.com)
List 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 by date:

Previous
From: "devi"
Date:
Subject: How to check success/failure of dml statements
Next
From: "Tony Griffiths(RA)"
Date:
Subject: calling functions from embedded sql