Re: Use of !~* to keep a varchar column UNIQUE - Mailing list pgsql-novice

From Don Morrison
Subject Re: Use of !~* to keep a varchar column UNIQUE
Date
Msg-id aee6519f0608181330j41d75365m223abcb49e95a35@mail.gmail.com
Whole thread Raw
In response to Re: Use of !~* to keep a varchar column UNIQUE  ("Daniel T. Staal" <DStaal@usa.net>)
List pgsql-novice
On 8/18/06, Daniel T. Staal <DStaal@usa.net> wrote:
> On Fri, August 18, 2006 1:52 pm, Don Morrison said:
>
> > The above works well enough, and I can live with it, but it is not
> > comprehensive...it would be nice to use a regular expression....and do
> > something like:
>
> The other way of doing this, depending on your data integrety needs, would
> be to use a before trigger on insert, which could trim the space and
> convert to some normalized case.  PL/Perl would be a good language for
> this.  ;)

Thanks for the idea Dan; I can't normalize the case in this instance
unfortunately, because the term being entered may or may not contain
an acronym.  Thanks for the attempt though, I really appreciate the
positive response I've received from the pgsql-novice list. :)

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Use of !~* to keep a varchar column UNIQUE case-insensitive
Next
From: "Don Morrison"
Date:
Subject: Re: Use of !~* to keep a varchar column UNIQUE case-insensitive