Обсуждение: BUG #5220: regexp fails on punctuation characters

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

BUG #5220: regexp fails on punctuation characters

От
"jef peeraer"
Дата:
The following bug has been logged online:

Bug reference:      5220
Logged by:          jef peeraer
Email address:      jef.peeraer@telenet.be
PostgreSQL version: 8.3
Operating system:   linux
Description:        regexp fails on punctuation characters
Details:

my lc_locale is set to en_US.UTF-8
if i do a search like this

select * from contacten
where naam ~* 'RÖN'
and my contacten table contains a column naam with the value
RÖNTGEN TECHNISCHE DIENST NV
-> it won't find it

the same query with
naam ILIKE '%RÖN%'  works perfectly

Re: BUG #5220: regexp fails on punctuation characters

От
Tom Lane
Дата:
"jef peeraer" <jef.peeraer@telenet.be> writes:
> my lc_locale is set to en_US.UTF-8
> if i do a search like this

> select * from contacten
> where naam ~* 'RÖN'
> and my contacten table contains a column naam with the value
> RÖNTGEN TECHNISCHE DIENST NV
> -> it won't find it

Works for me.

It is true that ~* isn't very good about upper/lower case matching
for non-ASCII letters, but that doesn't seem to apply to your
example.

            regards, tom lane