Skip to content

Instantly share code, notes, and snippets.

@dsbraz
Last active August 29, 2015 14:03
Show Gist options
  • Save dsbraz/9af8e4bec3f1b000cc1a to your computer and use it in GitHub Desktop.
Save dsbraz/9af8e4bec3f1b000cc1a to your computer and use it in GitHub Desktop.
Postgresql UTF-8
# sudo su - postgres
# createuser -s -r vagrant
# psql
# UPDATE pg_database SET datistemplate=FALSE WHERE datname='template1';
# DROP DATABASE template1;
# CREATE DATABASE template1 WITH owner=postgres encoding='UTF-8'
lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;
# 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