恢复转储时出现大量“无效命令\N”

Ton*_*ony 6 postgresql linux upgrade

我按照以下说明将 postgres 从 9.1 升级到 9.3: http://www.postgresql.org/docs/9.1/static/upgrading.html

当我恢复时(第 8 步),我收到大量如下消息: psql:/mnt/dumps/pre-upgrade.dump:61028: invalid command \N

有谁知道这个问题或者可以给我指出更好的 Linux 升级说明吗?

小智 0

我有一个来自 的转储pg_dump
\n我的错误输出是:

\n
psql:export.sql:1: error: invalid command \\n\npsql:export.sql:2: ERROR:  syntax error at or near "\xc3\xbf\xc3\xbe"\n
Run Code Online (Sandbox Code Playgroud)\n

我尝试转义并替换来修复\\n,但仍然有\xc3\xbf\xc3\xbe错误。
\n为了修复\xc3\xbf\xc3\xbe错误,我尝试编码为UTF-8.

\n

在某个时候,我从头开始,进行了新的导出,并且仅将导出转换为UTF-8. 不再输出错误,因此也修复了 error: invalid command \\n.

\n