Created
July 26, 2012 13:52
-
-
Save rapimo/3182134 to your computer and use it in GitHub Desktop.
change ENCODING for template1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Postgres makes it difficult four you to shoot yourselves in the foot | |
-- So it is not allowed to delete template databases | |
UPDATE pg_database SET datistemplate = FALSE where datname = 'template1'; | |
DROP DATABASE template1; | |
CREATE DATABASE template1 WITH 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