From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | andrew(at)supernews(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: like/ilike improvements |
Date: | 2007-05-25 03:34:13 |
Message-ID: | 46565935.8010608@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> OK, I studied it a bit more and now see what you're driving at: in this
> form of the patch, we treat % bytewise unless it is followed by _, in
> which case we treat it char-wise. That seems a good tradeoff,
> considering that such a pattern is probably pretty uncommon --- we
> should be willing to handle it a bit slower to simplify other cases.
>
> The patch seems still not right though, because you are advancing by
> bytes when \ follows %, and that isn't correct in a non-UTF8 encoding.
> The invariant we are actually insisting on here is that at the time of
> entry to MatchText(), whether initial or recursive, t and p must be
> correctly char-aligned. I suggest the attached revision of the logic as
> a way to clarify that, and maybe save a cycle or two in the inner loop
> as well.
>
Good, thanks.
> Yes, I concur we needn't bother with IsFirstByte except maybe as an
> Assert. If it is an Assert it should be up at the top of the function.
>
>
Looks like emails crossed. Glad we're on the same page. I'm away for a
few days, so I'll attend to this next week.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Hitoshi Harada | 2007-05-25 05:11:24 | Why not keeping positions in GIN? |
Previous Message | Andrew Dunstan | 2007-05-25 03:21:35 | Re: like/ilike improvements |
From | Date | Subject | |
---|---|---|---|
Next Message | mark | 2007-05-25 05:20:16 | Re: like/ilike improvements |
Previous Message | Andrew Dunstan | 2007-05-25 03:21:35 | Re: like/ilike improvements |