From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(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 14:55:26 |
Message-ID: | 201005281455.o4SEtQf18738@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tom Lane wrote:
> "Markus" <markus(dot)herven(at)outpost24(dot)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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-05-28 15:34:52 | Re: BUG #5478: ILIKE operator returns wrong result |
Previous Message | Tom Lane | 2010-05-28 14:48:00 | Re: BUG #5477: CREATE DOMAIN NOT NULL constraints not always enforced for INSERT with subquery |