【发布时间】:2019-01-08 14:10:37
【问题描述】:
我在 Windows 10 上下载了本地 PosgreSQL 11。
我尝试在命令行窗口中将 psql 中的目录更改为 c:\Program Files\PostgreSQL\11\bin>
我得到无效的命令或目录不存在
我尝试使用
postgres=# cd c:\Program Files\PostgreSQL\11\bin
Invalid command \Program. Try \? for help.
postgres-# \cd c:\Program Files\PostgreSQL\11\bin
Invalid command \Program. Try \? for help.
postgres-# \cd..
Invalid command \cd... Try \? for help.
postgres-# \cd ..
postgres-# \cd Program Files
\cd: could not change directory to "Program": No such file or directory
我什至不确定当前目录,因为 pwd 无法识别:
postgres-# \! pwd
'pwd' is not recognized as an internal or external command,
operable program or batch file.
非常感谢提前
UPADATE:想出了如何检查当前目录\! cd
试图以这种方式运行命令\! C:\>cd C:\Program Files\PostgreSQL\11\bin
我明白了:
postgres-# \! C:\>cd C:\Program Files\PostgreSQL\11\bin
Access is denied.
【问题讨论】:
-
为什么不更改目录之前运行
psql
标签: windows psql postgresql-11