Re: Redefining LIKE operator

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Pablo Sajnín <psajnin(at)bejerman(dot)com(dot)ar>, pgsql-general(at)postgresql(dot)org
Subject: Re: Redefining LIKE operator
Date: 2003-03-14 12:16:06
Message-ID: 32560000.1047644166@lerlaptop.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--On Friday, March 14, 2003 09:06:29 -0300 Pablo Sajnín
<psajnin(at)bejerman(dot)com(dot)ar> wrote:

> Hi,
>
> I need the LIKE operator to be case insensitive.
> What I did is to redefine the ~~ so it behaves as the ~~* operator:
>
> DROP OPERATOR ~~ (name, text);
> CREATE OPERATOR ~~ ( leftarg=name, rightarg=text, procedure=nameiclike,
> negator='!~~');
>
>
> The operator is created, but when I execute a query, LIKE is still being
> case-sensitive.
> Am I doing anything wrong?
> Is it not possible to redefine this operator?
> I am using the 7.2.2 version.
>
What's wrong with ILIKE?

>
>
> Thanks in advance
>
>
> Pablo Sajnin
> psajnin(at)bejerman(dot)com(dot)ar
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pablo Sajnn 2003-03-14 12:26:16 Re: Redefining LIKE operator
Previous Message Pablo Sajnn 2003-03-14 12:06:29 Redefining LIKE operator