Site icon IT Tutorial

Change PostgreSql database encoding

Hello there ,
change PostgreSql database encoding

Rename database with old encoding

alter database test RENAME to test_old;

Create database with new encoding

CREATE DATABASE test ENCODING=’UTF-8′ LC_COLLATE = ‘tr_TR.UTF-8′ LC_CTYPE=’tr_TR.UTF-8’ TEMPLATE template0;

Set new database owner

alter database test OWNER to test_user;

 

Exit mobile version