Re: [BUGS] like operator bug - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] like operator bug
Date
Msg-id 28484.936731866@sss.pgh.pa.us
Whole thread Raw
In response to like operator bug  (jfaith <jfaith@cemsys.com>)
List pgsql-bugs
jfaith <jfaith@cemsys.com> writes:
> create table tst(addr char(4));
> insert into tst values('1000');
> insert into tst values('1010');
> insert into tst values('1120');
> select * from tst where addr like '1%0';
> produces
> addr
> ----
> 1120(1 row)
> where it should return all of the example rows.

I believe I have fixed this.  If you need the fix before 6.5.2 is out,
line 188 in src/backend/utils/adt/like.c should return LIKE_FALSE not
LIKE_ABORT:

      if (*text !='\0')
!         return LIKE_ABORT;
      else

      if (*text !='\0')
!         return LIKE_FALSE;
      else

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alois Maier
Date:
Subject: Set Transcation Isolation level bug
Next
From: Alois Maier
Date:
Subject: Set Transaction Isolation level bug