Last active
April 2, 2020 14:28
-
-
Save tian-im/99221184175090f36f5064a5f88ca6a0 to your computer and use it in GitHub Desktop.
UTF8 template1 for Postgres db create
This file contains hidden or 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
update pg_database set datistemplate=false where datname='template1'; | |
drop database Template1; | |
-- if it complains the locale name -- run `locale -a` to list all locale names in terminal | |
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