Re: like/ilike improvements
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Guillaume Smet <guillaume.smet@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2007-09-20T13:42:20Z
Lists: pgsql-hackers
Attachments
- ilikefix.patch (text/x-patch) patch
Guillaume Smet wrote: app_hls > On 9/20/07, Andrew Dunstan <andrew@dunslane.net> wrote: > >> Can you retry both sets of tests but this time in C locale? The lower() >> code works differently in C locale, and it might be that we need to look >> at tweaking just one case. >> > > Please try the attached patch, which goes back to using a special case for single-byte ILIKE. I want to make sure that at the very least we don't cause a performance regression with the code done this release. I can't see an obvious way around the problem for multi-byte case - lower() then requires converting to and from wchar, and I don't see a way of avoiding calling lower(). If this is a major blocker I would suggest you look at an alternative to using ILIKE for your UTF8 data. cheers andrew