Skip to content

Instantly share code, notes, and snippets.

@geohacker
Created February 3, 2014 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geohacker/8782207 to your computer and use it in GitHub Desktop.
Save geohacker/8782207 to your computer and use it in GitHub Desktop.

Add this to ~/.profile -

export LANGUAGE="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
  1. Run source ~/.profile
  2. sudo su postgres psql
  3. update pg_database set datistemplate=false where datname='template1';
  4. drop database Template1;
  5. create database template1 with owner=postgres encoding='UTF-8' lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;
  6. update pg_database set datistemplate=true where datname='template1';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment