I have two instances of PostgreSQL installed on my server: 8.3 and 9.0. There seams to be some problem with Polish diacritic characters (like ółęąśżźć) on postgresql 9.0 client - psql.
When I connect to DB (either 8.3 or 9.0) with psql 8.3 - I can type all diacritics on the terminal without any problems:
www:/tmp# sudo -u postgres /usr/lib/postgresql/8.3/bin/psql -q
postgres=# ółśćń
However, when I connect to the same DBs with psql 9.0 client - I can't type diacritics on the terminal anymore:
www:/tmp# sudo -u postgres /usr/lib/postgresql/8.3/bin/psql -q
Here are some encoding settings:
www:/tmp# sudo -u postgres /usr/lib/postgresql/9.0/bin/psql -q -c "show client_encoding"
client_encoding
-----------------
UTF8
(1 row)
.
www:/tmp# sudo -u postgres /usr/lib/postgresql/8.3/bin/psql -q -c "show client_encoding"
client_encoding
-----------------
UTF8
(1 row)
.
www:/tmp# sudo -u postgres /usr/lib/postgresql/9.0/bin/psql -q -l
List of databases
Name | Owner | Encoding | Collation | Ctype | Access privileges
---------------------+--------------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | pl_PL.UTF-8 | pl_PL.UTF-8 |
.
www:/tmp# echo $LANG
pl_PL.UTF-8
It looks like DB/cluster configuration doesn't matter - if psql 8.x on terminal works fine and psql 9.x does not. Any idea how to fix that?