psql“无法识别更多"错误 [英] psql "more is not recognized" error
问题描述
我在 Windows 8.1(64 位)上使用 postgresql (9.4) 交互式终端 psql.安装并创建数据库和表并将数据插入一行后,我想查看数据.
I am using the postgresql (9.4) interactive terminal psql on Windows 8.1 (64 bit). After installing and creating a database and table and inserting data into a row I want to view the data.
但是,当我输入
SELECT * FROM my_table;
我收到一个错误:
'more' 不是内部或外部命令,也不是可运行的程序或批处理文件.
'more' is not recognized as an internal or external command, operable program or batch file.
添加C:\Windows\System32;"后到我的路径变量,在 Powershell 中有更多工作(例如更多 hello.txt),但在 psql 中仍然没有.
After adding "C:\Windows\System32;" to my path variable, more works in Powershell (e.g. more hello.txt) but still not in psql.
我还需要做什么才能使 SELECT 语句起作用?
What else do I need to do to make the SELECT statement work?
推荐答案
听起来像您启动 psql 的方式,C:\Windows\System32
实际上并不是在结果环境中的 PATH
上.
It sounds like the way you are launching psql, C:\Windows\System32
is not actually on the PATH
in the resulting environment.
您可以下载诸如 Process Explorer 之类的内容并使用它来查看在正在运行的 psql 进程的环境变量中,看看该路径是否存在.
You can download something like Process Explorer and use it to look at the environment variables for the running psql process and see if that path is present.
如果没有,您可以确保在调用 psql 的 shell 中设置它,将其设置为系统环境变量,在 中相应地设置 PATH
>cmd 文件,然后调用 psql 等
If not, you could make sure it's set in the shell from which psql is invoked, set it as a system environment variable, set PATH
accordingly in a cmd file and then invoke psql, etc.
set PATH=%PATH%;C:\Windows\System32
这篇关于psql“无法识别更多"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!