PostgreSQLでERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
utf-8でpostgresのDBを作成しようと思って
CREATE DATABASE hoge ENCODING 'utf8' ; ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) HINT: Use the same encoding as in the template database, or use template0 as template.
ってエラーが出た。
テンプレート指定しろ的な感じらしいので
CREATE DATABASE hoge encoding 'UTF-8' TEMPLATE template0;
で解決。