Skip to content

Instantly share code, notes, and snippets.

@ace
Created January 22, 2021 15:07
Show Gist options
  • Save ace/0fa803bb7f22c1ebfc30b1665d106992 to your computer and use it in GitHub Desktop.
Save ace/0fa803bb7f22c1ebfc30b1665d106992 to your computer and use it in GitHub Desktop.
Postgresql change template1 collation
ALTER database template1 is_template=false;
DROP database template1;
CREATE DATABASE template1
WITH OWNER = postgres
ENCODING = 'UTF8'
TABLESPACE = pg_default
LC_COLLATE = 'es_ES.UTF-8'
LC_CTYPE = 'es_ES.UTF-8'
CONNECTION LIMIT = -1
TEMPLATE template0;
ALTER database template1 is_template=true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment