Re: like/ilike improvements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: andrew(at)supernews(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: like/ilike improvements
Date: 2007-05-25 01:26:19
Message-ID: 28377.1180056379@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> However, I have just about convinced myself that we don't need
> IsFirstByte for matching "_" for UTF8, either preceded by "%" or not, as
> it should always be true. Can anyone come up with a counter example?

You have to be on a first byte before you can meaningfully apply
NextChar, and you have to use NextChar or else you don't count
characters correctly (eg "__" must match 2 chars not 2 bytes).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-05-25 01:56:58 Re: like/ilike improvements
Previous Message Tom Lane 2007-05-25 01:11:38 Re: Reviewing temp_tablespaces GUC patch

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2007-05-25 01:56:58 Re: like/ilike improvements
Previous Message Tom Lane 2007-05-25 00:45:40 Rewritten Index Advisor patch