Re: BUG #3737: lower/upper fails to match extended chars in LATIN1

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: BUG #3737: lower/upper fails to match extended chars in LATIN1
Дата
Msg-id 87d4ujc5zo.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: BUG #3737: lower/upper fails to match extended chars in LATIN1  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-bugs
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:

> Jonas Forsman wrote:
>
>> Try:
>> select * from table where lower(address) like '%=C3=A5%'
>>
>> This select fails to find addresses including capital =C3=85 and similar=
s in
>> LATIN1 (like =C3=85, =C3=84, =C3=96).=20

Isn't =C3 an upper-case letter? In which case lower(address) will never mat=
ch it
since by definition lower(address) will only contain characters which are
lower case. That is if address contains a "=C3" then lower(address) will co=
ntain
an "=E3" instead which won't match the "=C3" in the pattern.

I think you either need to put a lower() on both sides of the LIKE or use
ILIKE.

--=20
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL tra=
ining!

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Revisiting BUG #3684: After dump/restore, schema PUBLIC always exists
Следующее
От: Ben Leslie
Дата:
Сообщение: Re: BUG #3735: Can't create xml-stylesheet processing instruction