problems when comparing text with special chars

Поиск
Список
Период
Сортировка
От
Тема problems when comparing text with special chars
Дата
Msg-id 00ea01c5b0ce$10017650$1500a8c0@iwing
обсуждение исходный текст
Ответы Re: problems when comparing text with special chars  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
hi list

i got a weird problem. somehow, for pg-sql, this statement is not true:

SELECT lower('zwiebelbäcker') = 'zwiebelbäcker'
=> false (which is the wrong answer, obviously)

amazingly, this one works fine:

SELECT lower('zwiebelbacker') = 'zwiebelbacker'
=> true

thus, the following query fails:

SELECT login FROM users.users WHERE lower(login) = 'zwiebelbäcker'
=> 0 Result (not correct!!)

workaround:

SELECT login FROM users.users WHERE lower(login) = lower('zwiebelbäcker')
=> 1 Result (correct)

why is this and how can it be circumvented? my workaround of using lower()
only works as so long as i don't want case-insensitive checks... i've
already tried to cast it to text by using ::text, didn't help.

thanks,
thomas



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

Предыдущее
От: "Morgan Kita"
Дата:
Сообщение: Re: UPDATE: pg_dump fails due to invalid memory request
Следующее
От: "Morgan Kita"
Дата:
Сообщение: Re: UPDATE: pg_dump fails due to invalid memory request