Re: Case Insensitive Data Type

From: "Russell Black" <russell(dot)black(at)iarchives(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Case Insensitive Data Type
Date: 2002-05-24 22:53:43
Message-ID: 06fb01c20375$dac118a0$0464a8c0@iarchives.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'd be happy with something which was just plain case-insensitive. I don't
really think anyone is going to enter "Their Email <address(at)like(dot)this>"
Trimming whitepsace would be nice, but I could probably live without it.
I'm also comfortable with ignoring the fact that the spec says
Joe(at)somewhere(dot)com is really a different address than joe(at)somewhere(dot)com(dot)
Given that, I would imagine it would be much less than 100 lines of C code,
and could probably be done in plpgsql. Maybe it's still a big deal to
define all the operators for the new datatype, but I wouldn't mind giving it
a try if someone could tell me how to piggy-back on the regular string
operators, and string datatype (probably VARCHAR).

----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter Darley" <pdarley(at)kinesis-cem(dot)com>
Cc: "Russell Black" <russell(dot)black(at)iarchives(dot)com>;
<pgsql-general(at)postgresql(dot)org>
Sent: Friday, May 24, 2002 4:37 PM
Subject: Re: [GENERAL] Case Insensitive Data Type

> "Peter Darley" <pdarley(at)kinesis-cem(dot)com> writes:
> > I don't want to imply something about things I don't know anything
about,
> > but I'm interested in why nobody has suggested creating a new data type
> > using CREATE TYPE, setting up it's various functions and creating new
> > operators for it. It looks (reading the docs) like it would do what
Russel
> > wants without too much work. Is there some reason that folks avoid this
> > approach?
>
> That's what I was referring to at the end of the message you quoted.
> The question is what you define as "too much work" ;-).
>
> Given a C implementation of the required normalization function (I'm
> assuming plain lower() won't really cut it), you'd need probably O(100)
> lines of additional C code and a few dozen catalog entries to make it
> happen. A couple hours work for someone who'd done it before, rather
> longer for someone who hadn't ...
>
> regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-05-24 23:08:22 Re: Case Insensitive Data Type
Previous Message Tom Lane 2002-05-24 22:37:24 Re: Case Insensitive Data Type