Linux环境下"Postgresql"的汉字插入问题

2008-03-07 05:45:55.0     推荐:0    收藏:0    评论:0     来源:赛迪网

问:Linux环境下如何在Postgresql数据库中完成汉字插入?

解决方法:

首先用postgresql的用户登陆,(su - postgres) ,然后进入数据库,假设数据库名称为“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=#encoding GBK

现在就可以插入汉字了。 (责任编辑:卢兆林)


您可以针对本文进行:[评论]  [收藏]  [推荐]   [查看原文链接]  
  • 共有0条评论  点击查看更多评论
  • 网友评论仅供网友表达个人看法,并不表明e800同意其观点或证实其描述
我想发表评论:
用户名密码
  • 匿名发表
    验证码: