Redefining LIKE operator - Mailing list pgsql-general

From Pablo Sajnín
Subject Redefining LIKE operator
Date
Msg-id 306CDF5EF8BDD511AD350050BF1790C1DC70CA@POST
Whole thread Raw
Responses Re: Redefining LIKE operator  (Larry Rosenman <ler@lerctr.org>)
Re: Redefining LIKE operator  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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.



Thanks in advance


Pablo Sajnin
psajnin@bejerman.com.ar


pgsql-general by date:

Previous
From: Marcin Owsiany
Date:
Subject: Re: ~*, case insensitiveness and national chars
Next
From: Larry Rosenman
Date:
Subject: Re: Redefining LIKE operator