我是 Postgres 的新手,我正在尝试从 Windows 中的数据库转储文件加载/恢复 Postgres 数据库。当我尝试这样做时,我收到以下错误。作为 Postgres 的新手,我不确定该错误是什么意思。
命令
C:\Users\myuser>psql --single-transaction newdatabasename --file="C:\path\to\database-dump-file.sql"
错误
psql: fatal: -1 can only be used in non-interactive mode
我在 windows 命令 shell 中输入了命令,其中 PostgresBIN
目录的路径包含在PATH
. 这个错误指的是什么?我是否需要在 SQL Shell (psql) 中才能执行此命令?谷歌搜索似乎表明它可能与使用密码进行身份验证有关。