gpt4 book ai didi

postgresql - 尝试恢复备份时出错

转载 作者:行者123 更新时间:2023-11-29 12:22:22 25 4
gpt4 key购买 nike

这一行(518):

COPY wp_commentmeta (meta_id, comment_id, meta_key, meta_value) FROM stdin;
\.

出现此错误:

[ERROR ] 518.0: 语法错误,意外字符

这是什么?

我之前已经用这个数据库做了备份,现在我只是想把所有的表恢复到数据库中。

最佳答案

错误:

ERROR:  syntax error at or near "\"
LINE 1: ...a (meta_id, comment_id, meta_key, meta_value) FROM stdin; \.
^


********** Error **********

ERROR: syntax error at or near "\"
SQL state: 42601
Character: 77

指向 \. 中的\是问题所在。您确定需要 \. 吗?

根据 documentation :

End of data can be represented by a single line containing just backslash-period (.). An end-of-data marker is not necessary when reading from a file, since the end of file serves perfectly well; it is needed only when copying data to or from client applications using pre-3.0 client protocol.

尝试从行中删除您的 \. 并查看您的副本是否按预期工作。

关于postgresql - 尝试恢复备份时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13586688/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com