Re: Domains and supporting functions

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Domains and supporting functions
Date: 2006-02-19 12:49:07
Message-ID: 20060219124907.GB1323@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martin Pitt 2006-02-19 13:39:24 Re: Adding an ignore list to pg_restore, prototype patch #1
Previous Message Thomas Hallgren 2006-02-19 11:37:20 Re: Pgfoundry and gborg: shut one down