Обсуждение: BUG #4821: LIKE '%_' fails

Поиск
Список
Период
Сортировка

BUG #4821: LIKE '%_' fails

От
"Andrew Gierth"
Дата:
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.

Re: BUG #4821: LIKE '%_' fails

От
Tom Lane
Дата:
"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