Re: like/ilike improvements

Dennis Bjorklund <db@zigo.dhs.org>

From: db@zigo.dhs.org
To: "Andrew Dunstan" <andrew@dunslane.net>
Cc: "Tom Lane" <tgl@sss.pgh.pa.us>, "ITAGAKI Takahiro" <itagaki.takahiro@oss.ntt.co.jp>, "PostgreSQL-development" <pgsql-hackers@postgresql.org>
Date: 2007-05-23T05:55:04Z
Lists: pgsql-hackers
> And Dennis said:
>
>> It is only when you have a pattern like '%_' when this is a problem
>> and we could detect this and do byte by byte when it's not. Now we
>> check (*p == '\\') || (*p == '_') in each iteration when we scan over
>> characters for '%', and we could do it once and have different loops
>> for the two cases.
>
> That's pretty much what the patch does now - It never tries to match a
> single byte when it sees "_", whether or not preceeded by "%".

My comment was about UTF-8 since I thought we were making a special
version for UTF-8. I don't know what properties other multibyte encodings
have.

/Dennis