Re: UTF8MatchText - Mailing list pgsql-patches

From Tom Lane
Subject Re: UTF8MatchText
Date
Msg-id 4800.1179425811@sss.pgh.pa.us
Whole thread Raw
In response to Re: UTF8MatchText  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: UTF8MatchText  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-patches
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> Wait a second ... I just thought of a counterexample that destroys the
>> entire concept.  Consider the pattern 'A__B', which clearly is supposed
>> to match strings of four *characters*.  With the proposed patch in
>> place, it would match strings of four *bytes*.  Which is not the correct
>> behavior.

>  From what I can see the code is quite careful about when it calls
> NextByte vs NextChar, and after _ it calls NextChar.

Except that the entire point of this patch is to dumb down NextChar to
be the same as NextByte for UTF8 strings.

            regards, tom lane

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: UTF8MatchText
Next
From: Andrew Dunstan
Date:
Subject: Re: UTF8MatchText