Friday, October 25, 2013

Fixing Ubuntu Postgres Install

Ubuntu chose to install the default database as LATIN1, this is a problem for "double byte" languages and may cause issues with other languages.

To fix it:

Switch to root then:

export LANGUAGE="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
pg_dropcluster --stop 9.1 main
pg_createcluster --start -e UTF-8 9.1 main
 
NOTE: This completely nukes your DB install,
don't do this if you already have data in the database.

No comments:

Post a Comment