The following query:
select lower('ALGODÓN'), upper('algodón')
Results in:
lower | upper
---------+---------
algodÓn | ALGODóN
(1 row)
Python, on the other hand, gets this right:
>>> 'ALGODÓN'.lower()
'algodón'
Is there a way to get postgres to convert case of non-ascii characters properly?