Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
postgres pg_使用windows shell模式还原pbl_Windows_Postgresql_Cmd - Fatal编程技术网

postgres pg_使用windows shell模式还原pbl

postgres pg_使用windows shell模式还原pbl,windows,postgresql,cmd,Windows,Postgresql,Cmd,以下 “C:\ProgramFiles(x86)\pgAdmin III\1.14\pg_restore.exe”--主机本地主机--端口5432--用户名“postgres”--密码“postgres”--数据库名“base_nationale”--详细的“E:\dump\ff_d01_2011.dump” 给出此错误消息: pg_restore:命令行参数太多(第一个是“-host” 为什么它不起作用?您不能为--password指定一个值。该开关仅强制进行密码提示,实际上不需要 只需删除部

以下

“C:\ProgramFiles(x86)\pgAdmin III\1.14\pg_restore.exe”--主机本地主机--端口5432--用户名“postgres”--密码“postgres”--数据库名“base_nationale”--详细的“E:\dump\ff_d01_2011.dump”

给出此错误消息:

pg_restore:命令行参数太多(第一个是“-host”


为什么它不起作用?

您不能为
--password
指定一个值。该开关仅强制进行密码提示,实际上不需要

只需删除部分
——密码“postgres”
。如果需要密码,
pg\u restore
将自动提示您输入密码

如果要在没有密码提示的情况下运行该命令,则需要一个
.pgpass
文件或使用环境变量
pgpass

详情请参阅手册:

还是这个问题