Windows 的 PostgreSQL 中的 psql_history 文件在哪里

Where is the psql_history file in Windows's PostgreSQL

我的 PostgreSQL 版本是 9.6 和 Windows Server 2012。

但在 %APPDATA%\postgresql\psql_history 中找不到 PostgreSQL psql_history 文件。 我怎样才能找到这个文件?

此外,当我输入 \s 命令查找命令历史记录时,提示消息“此安装不支持历史记录”

因为“本机”Windows 安装不支持历史记录,所以找不到历史文件。这就是它在 Windows.

上的工作方式

如果你想在Windows上使用命令行历史记录,你可以安装cygwin然后通过cygwin安装psql。