Re: Case Insensitive Data Type
От | Russell Black |
---|---|
Тема | Re: Case Insensitive Data Type |
Дата | |
Msg-id | 06fb01c20375$dac118a0$0464a8c0@iarchives.com обсуждение исходный текст |
Ответ на | Re: Case Insensitive Data Type ("Peter Darley" <pdarley@kinesis-cem.com>) |
Ответы |
Re: Case Insensitive Data Type
|
Список | 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@like.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@somewhere.com is really a different address than joe@somewhere.com. 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@sss.pgh.pa.us> To: "Peter Darley" <pdarley@kinesis-cem.com> Cc: "Russell Black" <russell.black@iarchives.com>; <pgsql-general@postgresql.org> Sent: Friday, May 24, 2002 4:37 PM Subject: Re: [GENERAL] Case Insensitive Data Type > "Peter Darley" <pdarley@kinesis-cem.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
В списке pgsql-general по дате отправления: