Re: doubts about a constraint's definition - Mailing list pgsql-general

From Peter Gibbs
Subject Re: doubts about a constraint's definition
Date
Msg-id 030001c2efb6$bcbbb620$0b01010a@emkel.co.za
Whole thread Raw
In response to doubts about a constraint's definition  ("enediel" <enediel@com.ith.tur.cu>)
List pgsql-general
enediel wrote:

> I need to create a column, where the information is conserved in the same
> way that it was written by the user, but the data of this column is unique
> if it's only taken to capital
>
> declaring a constraint
> ... unique(column name) is not enough to me  'cause
>
> 'ab'
> 'AB'
> 'aB'
> ....
> will be accepted
>

Create a unique functional index e.g.
create unique index index_name on table_name (upper(fieldname));
--
Peter Gibbs
EmKel Systems


pgsql-general by date:

Previous
From: "enediel"
Date:
Subject: Re: doubts about a constraint's definition
Next
From: "enediel"
Date:
Subject: Re: doubts about a constraint's definition