-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.psql_history
17 lines (16 loc) · 874 Bytes
/
.psql_history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# I have no idea which of these were necessary in the end
CREATE ROLE codegolf SUPERUSER LOGIN;
/q
\q
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';
update pg_database set datistemplate=false where datname='template1';
drop database Template1;
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';
create database template1 with owner=postgres encoding='UTF-8' lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;