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

Bug in ILIKE?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Bug in ILIKE?
Date: 2008-09-26 02:04:12
Message-ID: 4318.1222394652@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Good:

regression=# select 'T' ilike 't';
 ?column? 
----------
 t
(1 row)

Not so good:

regression=# select 'T' ilike E'\\t';
 ?column? 
----------
 f
(1 row)

ISTM backslash is only supposed to turn off the pattern-language
specialness of characters, not render them case sensitive.  The reason
this happens is that the backslash case in MatchText() checks for exact
equality.  I think it should be checking for TCHAR() equality, same as
when it is just checking two ordinary characters.  Comments?  Is this a
backpatchable bug fix, or should we only change the behavior for 8.4 and
beyond?

			regards, tom lane

Responses

pgsql-hackers by date

Next:From: KaiGai KoheiDate: 2008-09-26 02:09:37
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches
Previous:From: Bruce MomjianDate: 2008-09-26 01:41:00
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches

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