Re: BUG #5478: ILIKE operator returns wrong result

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Markus <markus(dot)herven(at)outpost24(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5478: ILIKE operator returns wrong result
Date: 2010-05-28 16:11:40
Message-ID: 28626.1275063100@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-05-28 16:50:17 Re: BUG #5478: ILIKE operator returns wrong result
Previous Message Tom Lane 2010-05-28 15:51:08 Re: BUG #5478: ILIKE operator returns wrong result