I\'m trying to change the default value for the client_encoding configuration variable for a PostgreSQL database I\'m running. I want it to be UTF8
Did you set client_encoding in postgresql.conf (and reload config or restart)? Make sure it's UTF8 not utf8
What is the result of cat ~/.psqlrc and cat /etc/psqlrc ?
I know you're looking for server-side default, but on the client, you can set an OS envvar:
export PGCLIENTENCODING=UTF8
to do this for all users (on that machine), put that in /etc/profile