Re: ILIKE and indexes - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: ILIKE and indexes
Date
Msg-id 20070318191706.GE5722@svana.org
Whole thread Raw
In response to ILIKE and indexes  ("Guillaume Smet" <guillaume.smet@gmail.com>)
Responses Re: ILIKE and indexes
List pgsql-hackers
On Sun, Mar 18, 2007 at 07:30:35PM +0100, Guillaume Smet wrote:
> I have planned to write the operator class as a "contrib" module but I
> couldn't find the link between LIKE operator and text_pattern_ops
> opclass which uses ~=~ and all its variants. Andrew from Supernews
> told me it was hardcoded in the planner so the introduction of this
> new opclass requires a few changes to the planner to take it into
> account for ILIKE.

Er, it's link between LIKE and the ~=~ that's hard coded, however the
link between the operator class and the operator is nothing special,
that's why it's an operator class.

So I think it's easier that you think: just build the operator class
and make sure you use the right operator so the planner uses it. ILIKE
already maps to an operator...

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: [COMMITTERS] pgsql: Add GUC temp_tablespaces to provide a default location for
Next
From: "Guillaume Smet"
Date:
Subject: Re: ILIKE and indexes