Re: Case sensitivity

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Frank Millman <frank(at)chagford(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Case sensitivity
Date: 2005-08-09 11:04:23
Message-ID: 20050809110418.GC8244@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 09, 2005 at 11:57:48AM +0200, Martijn van Oosterhout wrote:
> Another option would be to create a new datatype 'itext' which works
> like text except it compares case insensetively. PostgreSQL is flexible
> like that. Here's something to get you started, see below for example.
>
> http://svana.org/kleptog/pgsql/type_itext.sql
>
> At the moment it uses SQL functions for the comparisons, for production
> you'd probably want to have them in C for performance. Also, it's not
> pg_dump safe (no operator class support).

Oops, turns out there *is* a CREATE OPERATOR CLASS but my version of
psql doesn't have it in command completion. And when you use that it
*is* saved by pg_dump. Problem solved.

I've tested various things, DISTINCT works, ORDER BY works, GROUP BY
works. Neat huh?

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-general by date

  From Date Subject
Next Message Richard Huxton 2005-08-09 11:38:52 Re: Case sensitivity
Previous Message Magnus Hagander 2005-08-09 10:16:25 Re: The cost of SET search_path TO