New answers tagged


You can also set it as a default for any user or role (takes effect after a new connection is established): ALTER ROLE <rolename> SET client_encoding = 'UTF8';


You can either set the environment variable PGCLIENTENCODING in the operating system or include the set command in .psqlrc if you only need it for psql

Top 50 recent answers are included