Re: Best way to use indexes for partial match at

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
Cc: Andrus <eetasoft(at)online(dot)ee>, pgsql-general(at)postgresql(dot)org
Subject: Re: Best way to use indexes for partial match at
Date: 2005-11-11 08:32:38
Message-ID: 200511110932.38837.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe wrote:
> No, I wouldn't think one to one would be necessary. If you had a
> primary key that was case insensitive, for example, it would not map
> one to one. It would, in fact, be MORE greedy about matching, so
> that you could not have both a "Peter Eisentraut" and a "peter
> eisentraut" in the same table.

I suppose one could define equivalence classes that way, and if
everything else that interacted with the table (foreign keys, other
functions, etc.) behaved consistently with respect to those equivalence
classes, things would work out. Lots of "if's" though. The better and
safer way to do that, however, would be to define a data type.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Guido Neitzer 2005-11-11 08:33:53 Re: Ordering and unicode
Previous Message Jeff Davis 2005-11-11 08:25:32 return next