Re: ILIKE and indexes
От | Guillaume Smet |
---|---|
Тема | Re: ILIKE and indexes |
Дата | |
Msg-id | 1d4e0c10703181251n2af1714fo7e1a155c84fd65e3@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: ILIKE and indexes (Martijn van Oosterhout <kleptog@svana.org>) |
Список | pgsql-hackers |
On 3/18/07, Martijn van Oosterhout <kleptog@svana.org> wrote: > Er, it's link between LIKE and the ~=~ that's hard coded Yes. > 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... Yeah I know. The fact is that you can't use an index for any pattern and it depends on the database encoding too. The code in the planner checks that the pattern and the database encoding makes the index usable and rewrites the LIKE clause (and the ILIKE clause if the pattern begins with a non alpha character) so that it can use the index. So I'm pretty sure I have to change this behaviour in the planner or did I miss something? -- Guillaume
В списке pgsql-hackers по дате отправления: