我尝试了这个命令。
pg_restore -U postgres -d test1 table4.dump
并且出现了错误
pg_restore:[archiver]输入文件似乎是文本格式的转储。请使用psql。
如何恢复转储文件?
pg_restore -U postgres -d test1 table4.dump
并且出现了错误
pg_restore:[archiver]输入文件似乎是文本格式的转储。请使用psql。
如何恢复转储文件?
你以纯SQL格式转储了表格,这种格式是为了提供给psql使用的。
但pg_restore无法识别!-> 有关pg_restore的文档
对于整个数据库:
cat db.txt | psql dbname
或者
psql dbname < db.txt
对于表格:
使用 psql 连接到数据库:
psql /i path/to/filename
会帮助...
编辑/更新:
您要求AWS Redshift-这是解决方案:
登录到AWS管理控制台,打开Amazon Redshift控制台https://console.aws.amazon.com/redshift/