BUG #4821: LIKE '%_' fails

Started by Andrew Gierthalmost 17 years ago2 messagesbugs
Jump to latest
#1Andrew Gierth
andrew@tao11.riddles.org.uk

The following bug has been logged online:

Bug reference: 4821
Logged by: Andrew Gierth
Email address: andrew@tao11.riddles.org.uk
PostgreSQL version: 8.3-8.4
Operating system: all
Description: LIKE '%_' fails
Details:

# select 'foo' like '%_';
?column?
----------
f
(1 row)

correct result would be 't'

8.1 and 8.2 seem to get this one right.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Gierth (#1)
Re: BUG #4821: LIKE '%_' fails

"Andrew Gierth" <andrew@tao11.riddles.org.uk> writes:

# select 'foo' like '%_';
?column?
----------
f
(1 row)

correct result would be 't'

Hmmm ... there's actually special-case code for '%_' in there,
but it seems to be just plain broken.

regards, tom lane