Re: BUG #5478: ILIKE operator returns wrong result - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5478: ILIKE operator returns wrong result
Date
Msg-id 28626.1275063100@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #5478: ILIKE operator returns wrong result  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5478: ILIKE operator returns wrong result
List pgsql-bugs
I wrote:
> No, that patch is just plain wrong.  It eats %'s that would affect
> the later recursive MatchText calls.

Hmm ... actually, it's not wrong, but it's not good either.  What we
really ought to do here is not just eat _'s following %, but eat *any
mixture of* % and _, advancing over a text character per _.  The
subsequent search loop is reached only when we find a literal pattern
character to match.  This generalizes the original intention of not
using recursion to deal with simple advancing.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5478: ILIKE operator returns wrong result
Next
From: Tom Lane
Date:
Subject: Re: BUG #5478: ILIKE operator returns wrong result