You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
435 B
17 lines
435 B
10 years ago
|
/*
|
||
|
* Updates the default 'template1' database into UTF-8 instead of SQL_ASCII.
|
||
|
*/
|
||
|
|
||
|
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
|
||
|
|
||
|
DROP DATABASE template1;
|
||
|
|
||
|
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
|
||
|
|
||
|
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
|
||
|
|
||
|
\c template1
|
||
|
VACUUM FREEZE;
|
||
|
|
||
|
UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template1';
|