Re: BUG #5478: ILIKE operator returns wrong result
| От | Bruce Momjian |
|---|---|
| Тема | Re: BUG #5478: ILIKE operator returns wrong result |
| Дата | |
| Msg-id | 201005281455.o4SEtQf18738@momjian.us обсуждение исходный текст |
| Ответ на | Re: BUG #5478: ILIKE operator returns wrong result (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: BUG #5478: ILIKE operator returns wrong result
|
| Список | pgsql-bugs |
Tom Lane wrote:
> "Markus" <markus.herven@outpost24.com> writes:
> > select 'ba' ilike '%__%';
> > return true as expected in 8.2 but false in 8.4.
>
> I have a feeling that this represents still another bug in the
> special-case path for % followed by _ (cf bug #4821). If so,
> maybe we ought to just toss out that optimization?
Yea, looks like it is this code in like_match.c:
/* %_ is the same as _% - avoid matching _ repeatedly */
do
{
NextChar(t, tlen);
NextByte(p, plen);
} while (tlen > 0 && plen > 0 && *p == '_');
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
В списке pgsql-bugs по дате отправления: