Re: like/ilike improvements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, andrew(at)supernews(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: like/ilike improvements
Date: 2007-05-25 13:42:18
Message-ID: 8094.1180100538@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at> writes:
>> 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).

> Well, for utf8 NextChar could advance to the next char even if the
> current byte
> position is in the middle of a multibyte char (skip over all 10xxxxxx).

No doubt the macro could be made to work that way, but would it result
in correct matching behavior? I doubt it --- you just matched an "_"
to half a character, or some such.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-05-25 13:47:15 Re: like/ilike improvements
Previous Message Andrew Dunstan 2007-05-25 11:11:32 Re: like/ilike improvements

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-05-25 13:47:15 Re: like/ilike improvements
Previous Message Joachim Wieland 2007-05-25 12:40:28 ecpg USE_INTEGER_DATETIMES missing in msvc build