Use UTF-8 as the default encoding for postgres databases

To avoid problems with encoding if you forget to change from the default SQL_ASCII when you create a database, I find it is best to set the default to UTF-8 whenever I set up a new server. One less thing to worry about.

THIS WILL DESTROY ALL DATA. DO NOT DO THIS EXCEPT RIGHT AFTER YOU INSTALL POSTGRES

pg_dropcluster --stop 9.1 main
pg_createcluster --start -e UTF-8 9.1 main
This entry was posted in postgres. Bookmark the permalink.

Comments are closed.