Thread: RE: [SQL] Case insensitive equality operator

RE: [SQL] Case insensitive equality operator

From
"Jackson, DeJuan"
Date:

> -----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