perl: warning: Setting locale failed. LANGUAGE unset

On Ubuntu Server, when I run pg_dump or something, I got:

perl: warning: Setting locale failed.

PostgresQL pg_dump 基本用法

Dump一个数据库到一个sql文件
$ pg_dump mydb > db.sql

把这个sql文件导入到一个新建的数据库中
$ psql -d newdb -f db.sql

只du

[psycopg2] Ident authentication failed for user

运行 manage.py syncdb 时出现下面的错误:
psycopg2.OperationalError: FATAL: Ident authentication failed for us

Postgresql 创建 UTF-8 数据库

我的vps上用apt-get命令安装的postgreSQL不知道为什么encoding是ASCII的
这样创建的数据库也是ASCII的

Google了下发现可以用这个命令创建utf-8数据库