简体   繁体   English

当我使用pg_dump备份postgres时,发生错误,如何摆脱这个错误?

[英]when I use pg_dump to back up postgres, an error occur, how can I get rid of this error?

The output message is here: 输出消息在这里:

pg_dump: Dumping the contents of table "categorytype_show" failed: PQgetResult() failed. pg_dump:转储表“ categorytype_show”的内容失败:PQgetResult()失败。 pg_dump: Error message from server: ERROR: character with byte sequence 0xef 0xbb 0xbf in encoding "UTF8" has no equivalent in encoding "GBK" pg_dump: The command was: COPY public.categorytype_show (categoryid, categorylevel, categoryname, categoryparentid, leafcategory, catalogenabled, autopayenabled, b2bvatenabled, bestofferenabled, expired, intlautosfixedcat, keywords, lsd, numofitems, orpa, orra, sellerguaranteeeligible, virtual, itemtype, isselect, imgurl, id, ctime) TO stdout; pg_dump:来自服务器的错误消息:错误:编码为“ UTF8”的字节序列为0xef 0xbb 0xbf的字符与编码为“ GBK”的等效字符catalogenabled,autopayenabled,b2bvatenabled,bestofferenabled,expired,intlautosfixedcat,关键字,lsd,numofitems,orpa,orra,seller,guaranteeligible,virtual,itemtype,isselect,imgurl,id,ctime)TO stdout;

They key is: 他们的关键是:

ERROR: character with byte sequence 0xef 0xbb 0xbf in encoding "UTF8" has no equivalent in encoding "GBK" 错误:编码为“ UTF8”的字节序列为0xef 0xbb 0xbf的字符在编码“ GBK”中没有等效字符

You have an encoding error. 您有编码错误。 To overcome that, dump the data in UTF8 format as 为了解决这个问题,请将数据以UTF8格式转储为

pg_dump -E UTF8

Also consider using the -Fc option to pg_dump. 还可以考虑对pg_dump使用-Fc选项。 More details at : https://www.postgresql.org/docs/9.1/static/app-pgdump.html 更多详细信息,请访问: https : //www.postgresql.org/docs/9.1/static/app-pgdump.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM