Indexing of LIKE queries is broken in current sources - Mailing list pgsql-hackers

From Tom Lane
Subject Indexing of LIKE queries is broken in current sources
Date
Msg-id 10307.968873126@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
I noticed today that current sources are not able to use an index
for a query likeselect * from foo where bar like 'xyz%';

It seems that the parser now emits some kind of function call for LIKE
expressions, whereas the optimizer's code to use indexes for LIKE is
looking for an operator.

I have more pressing things to do than try to teach the optimizer about
looking for function calls as well as operators, so I recommend
reverting the parser's output to what it was.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Ricardo Muggli
Date:
Subject: minor fixes for regress
Next
From: "Mitch Vincent"
Date:
Subject: Linux / PostgreSQL question