Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

postgres change deafult encode

postgres@yourserver:~$ psql


UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UTF8';
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
c template1;
VACUUM FREEZE;
 
PREVIOUS NEXT
Tagged: #postgres #change #deafult #encode
ADD COMMENT
Topic
Name
8+8 =