| From: | "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com> |
|---|---|
| To: | Christophe Labouisse <labouiss(at)club-internet(dot)fr>, pgsql-sql(at)postgreSQL(dot)org |
| Subject: | RE: [SQL] Case insensitive equality operator |
| Date: | 1999-01-08 19:21:35 |
| Message-ID: | F10BB1FAF801D111829B0060971D839F5C5E5C@cpsmail |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
> -----Original Message-----
> I'm looking for a case insensitive equality operator (something like
> ~~*). There are of course regular expression matches but I am
> reluctent to use them because I need to preprocess my string before
> using it (putting it between a ^ and a $, escaping special
> characters)
> and because I'm afraid that the use of regular expressions will be
> more resource demanding than a simple equality.
>
> Any ideas ?
>
> Cheers
Why don't you just use the upper or lower functions.
i.e. SELECT * from t1 WHERE UPPER(a)= 'BLAH';
You could even use a functional index on a
CREATE INDEX upper_a ON t1 (UPPER(a) text_ops);
-DEJ
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nick Massaro | 1999-01-08 23:25:11 | force indexed search? |
| Previous Message | Christophe Labouisse | 1999-01-07 22:25:49 | Case insensitive equality operator |