It looks like postgres upper/lower
function does not handle select characters in Turkish character set.
select upper(\'Aaı\'), lower(\'Aaİ\') from
It seems to me that your problem is related to Windows. This is how it looks on Ubuntu (Postgres 8.4.14), database encoding UTF-8:
test=# select upper('Aaı'), lower('Aaİ');
upper | lower
-------+-------
AAI | aai
(1 row)
My recommendation would be - if you have to use Windows - to write a stored procedure that will do the conversion for you. Use built-in replace
: replace('abcdefabcdef', 'cd', 'XX')
returns abXXefabXXef
. There might be a more optimal solution, I do not claim that this approach is the correct one.