May 30, 2013

Postgres

Config pg_hba:
local   all             postgres                                peer
local   all             postgres                                md5
local   all             all                                         md5

Cac chu de hay ve Postgres:
http://momjian.us/main/blogs/pgblog_categories.html



Unicode:

update pg_database set datallowconn = TRUE where datname = 'template0';
\c template0
update pg_database set datistemplate = FALSE where datname = 'template1';
drop database template1;
create database template1 with template = template0 encoding = 'UTF8' LC_CTYPE = 'en_US.utf8' LC_COLLATE = 'en_US.utf8';
update pg_database set datistemplate = TRUE where datname = 'template1';
\c template1
update pg_database set datallowconn = FALSE where datname = 'template0';

No comments:

Post a Comment

New comment