我曾使用以下语法进行pg_dump和还原操作。
pg_dump eval --inserts -b -c --encoding UTF8 -Fc -f eval.sql.tar.gz -x -U postgres
createdb -T template0 test -U postgres
pg_restore -d test eval.sql.tar.gz -e -U postgres
备份成功,没有错误,但还原时出现了一些错误。我在同一台机器上使用相同的用户和权限进行备份和还原,尝试使用其他格式(纯文本、tar、压缩),但仍然出现相同的错误。我的pg版本是8.4.11,psql版本也是8.4.11。我不确定是什么原因导致这些错误,有人可以帮助我吗?
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 4965; 0 138871 TABLE DATA ir_act_report_xml insigni
pg_restore: [archiver (db)] could not execute query: ERROR: invalid input syntax for integer: "purchase.order"
LINE 1: ...st for Quotation', 'ir.actions.report.xml', NULL, 'purchase....
^
Command was: INSERT INTO ir_act_report_xml VALUES (350, 'Request for Quotation', 'ir.actions.report.xml', NULL, 'purchase.order', 'purcha...