Re: doubts about a constraint's definition

From: "Peter Gibbs" <peter(at)emkel(dot)co(dot)za>
To: "enediel" <enediel(at)com(dot)ith(dot)tur(dot)cu>, "postgresql" <pgsql-general(at)postgresql(dot)org>
Subject: Re: doubts about a constraint's definition
Date: 2003-03-21 14:32:44
Message-ID: 030001c2efb6$bcbbb620$0b01010a@emkel.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Anand B Kumar 2003-03-21 14:38:59 Please clarify with regard to Renaming a Sequence
Previous Message Georgi Chorbadzhiyski 2003-03-21 12:10:26 Re: rules problem