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

上一篇 / 下一篇  2008-03-07 15:23:00 / 个人分类:数据天地

 

问: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

现在就可以插入汉字了


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-08-20  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 1285
  • 日志数: 90
  • 建立时间: 2007-04-03
  • 更新时间: 2008-04-07

RSS订阅

Open Toolbar