Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group