Re: [BUGS] like operator bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jfaith <jfaith(at)cemsys(dot)com>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: [BUGS] like operator bug
Date: 1999-09-07 19:17:46
Message-ID: 28484.936731866@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

jfaith <jfaith(at)cemsys(dot)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

Browse pgsql-bugs by date

  From Date Subject
Next Message Patrick Logan 1999-09-08 16:49:09 Problem enabling pltcl
Previous Message Alois Maier 1999-09-07 18:59:49 Set Transcation Isolation level bug