首先用postgresql的用戶登陸,(su - postgres) ,然后進(jìn)入數(shù)據(jù)庫(kù),假設(shè)數(shù)據(jù)庫(kù)名稱為“house”,命令為
[postgres@ITC-S postgres]$ psql house
Welcome to psql 8.0.1, the PostgreSQL interactive terminal.
Type:? copyright for distribution terms
?????? h for help with SQL commands
?????? ? for help with psql commands
?????? g or terminate with semicolon to execute query
?????? q to quit
house=#
輸入encoding GBK
house=#set encoding GBK
然后就可以插入漢字了。
from: http://publish.it168.com/2006/0219/20060219173801.shtml?positioncode=1547