Reputation: 27
My PostgreSQL version is 9.6 and Windows Server 2012.
but PostgreSQL psql_history file was not found in %APPDATA%\postgresql\psql_history. How can i find this file?
also, when I input \s
command for finding command history, alerting message "history is not supported by this installation"
Upvotes: 2
Views: 1236
Reputation: 71
Another option is to let Powershell maintain your history. Each psql command will be run as it is and returned to Powershell. Use the -W switch to be promtped for the username's password. Bracket the complete command in double quotes. See this
psql -h server.domain.local -U your_username -d your_database -W -c "your complete psql command;"
Upvotes: 0
Reputation: 44137
Because history is not supported on "native" Windows installations, there is no history file to find. This is how it works on Windows.
If you want to use command line history on Windows, you can install cygwin and then install psql via cygwin.
Upvotes: 3