Skip to content

Instantly share code, notes, and snippets.

@katylava
Created January 4, 2011 18:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katylava/765188 to your computer and use it in GitHub Desktop.
Save katylava/765188 to your computer and use it in GitHub Desktop.
make sure new database are created with encoding UTF8
UPDATE pg_database SET datistemplate=FALSE WHERE datname='template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH owner=postgres template=template0 encoding='UTF8';
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