Re: Domains and supporting functions - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Domains and supporting functions
Date
Msg-id 20060219124907.GB1323@svana.org
Whole thread Raw
In response to Domains and supporting functions  (elein <elein@varlena.com>)
List pgsql-hackers
On Sat, Feb 18, 2006 at 09:27:47PM -0800, elein wrote:
> I've got a domain based on a text type.
> I've overridden the equal operator with
> lower(text) = lower(text).
>
> I created a table containing my new domain type
> and can see that the equals operator is not
> being used to determine uniqueness.

What you want is citext.

http://gborg.postgresql.org/project/citext/projdisplay.php

It is a case-insensetive type with indexing and conparison support.

Domains arn't going to do what you want...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: Pgfoundry and gborg: shut one down
Next
From: Martin Pitt
Date:
Subject: Re: Adding an ignore list to pg_restore, prototype patch #1