Re: like/ilike improvements - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: like/ilike improvements
Date
Msg-id 4655D33B.2050905@dunslane.net
Whole thread Raw
In response to Re: like/ilike improvements  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:
> I'm not sure I believe the new coding for %-matching at all, and I
> certainly don't like the 100% lack of comments explaining why the
> different cases are necessary and just how they differ.  In particular,
> once we've advanced more than one character, why does it still matter
> what was immediately after the %?
>
>
>   

I don't understand the question. The % processing looks for a place that 
matches what is immediately after the % and then tries to match the 
remainder using a recursive call - so it never actually does matter. I 
haven't actually changed the fundamental logic AFAIK, I have just 
rearranged and optimised it some.

I admit that it takes some pondering to understand - I certainly intend 
to adjust the comments once we are satisfied the code is right. It's 
going to be next week now before I finish this up :-(

cheers

andrew


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: like/ilike improvements
Next
From: "Karl O. Pinc"
Date:
Subject: Re: COPY into a view; help w. design & patch