- 论坛徽章:
- 0
|
本帖最后由 angely96 于 2010-08-03 20:34 编辑
是这样的,我的PostgreSQL 8.2运行在AIX上,我导出了数据库的表结构,并用pgadmin备份了部分表的数据,
然后我在Win上安装了PostgreSQL 8.4,想进行测试。我导入了数据库表结构,并用pgadmin对部分表进行恢复,恢复时,报错如下:- C:\Program Files\pgAdmin III\1.8\pg_restore.exe -h localhost -p 5432 -U postgres -d anadb -a -t t_stream_07_22 -v "C:\Users\Administrator\Desktop\数据库备份\t_stream_07_22.backup"
- pg_restore: connecting to database for restore
- pg_restore: restoring data for table "t_stream_07_22"
- pg_restore: [archiver (db)] Error while PROCESSING TOC:
- pg_restore: [archiver (db)] Error from TOC entry 11301; 0 50044 TABLE DATA t_stream_07_22 postgres
- pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0x80
- HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
- CONTEXT: COPY t_stream_07_22, line 2586
- WARNING: errors ignored on restore: 1
- 进程退出并返回 1。
复制代码 一直找不到问题所在,找了一下说是字符集问题,还是怎么都设置不好。
另外,我查看了我在Win系统中的PostgreSQL服务器字符,如下:
D:\Program files\PostgreSQL\8.4\bin>psql.exe -d anadb -Upostgres
psql (8.4.4)
输入 "help" 来获取帮助信息.
anadb=#
anadb=# show client_encoding;
client_encoding
-----------------
gbk
(1 行记录)
anadb=#
请求各位大侠的帮助。太感谢了! |
|