Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ildus/1122198 to your computer and use it in GitHub Desktop.
Save ildus/1122198 to your computer and use it in GitHub Desktop.
change postgresql template1 db encoding to utf8 (unicode) by dropping it and recreating from template0
# change postgresql template1 db encoding to utf8 (unicode) by dropping it and recreating from template0
UPDATE pg_database SET datistemplate=false WHERE datname='template1';
drop database template1;
create database template1 with template = template0 encoding = 'UTF8';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment