Re: BUG #7783: lower & upper function incorrect work
От | Tom Lane |
---|---|
Тема | Re: BUG #7783: lower & upper function incorrect work |
Дата | |
Msg-id | 3144.1357252168@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #7783: lower & upper function incorrect work (alex.shniperson@gmail.com) |
Список | pgsql-bugs |
alex.shniperson@gmail.com writes: > PostgreSQL version: 9.1.7 > Operating system: osx lion 10.7.5 > 1) create DataBase with > ENCODING = 'UTF8' > LC_COLLATE = 'C' > LC_CTYPE = 'C' > 3) insert one simple record with Russian word > INSERT INTO testtable (id, name) VALUES (1, 'Ðалог'); > 4) try to select data with upper & lower functions with 'like' operator > select *, lower(name), upper(name) from testtable where lower(name) like > '%залог%' This is not a bug. You specified LC_CTYPE = "C", so upper/lower case conversion converts only ASCII letters. You need to specify a Russian locale if you want case conversion to work on Russian letters. Now having said that, I'm pretty sure that UTF8 locales are completely broken on OS X, so that this wouldn't work even if you had specified the right locale. But that's Apple's fault; there's little we can do about it. I believe locale ru_RU.ISO8859-5 (with the matching encoding) would behave sanely on OS X, if that's an acceptable fix for you. regards, tom lane
В списке pgsql-bugs по дате отправления: