Problem with diacritics on psql 9.0 (PostgreSQL)
Posted
by
Gaks
on Server Fault
See other posts from Server Fault
or by Gaks
Published on 2011-01-10T11:59:01Z
Indexed on
2011/01/10
12:55 UTC
Read the original article
Hit count: 434
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 óleaszzc) 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=# ólscn
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?
© Server Fault or respective owner