PostgreSQL command history on Windows
On Windows, there isn't an exact equivalent to a .bash_history because cmd.exe is an intrinsically different type of shell. I think you're referring more to the .psql_history (see related question). 

There is a "SQL Shell" available in the SQL Command Line Terminal of the EnterpriseDB Windows distribution of PostgreSQL that supports a command history. However, I prefer to use the Windows command prompt instead of the GUI.

The error message you are getting indicates that psql.exe was built without readline support (reference).

The best way I have found to run psql via the normal Windows command prompt is to create a shortcut:

Target: %SystemRoot%\system32\cmd.exe /U /c "chcp 1252 &amp; C:\Progra~1\PostgreSQL\9.6\bin\psql.exe -U database_username -d database_name"



The command history can be controlled via Command history Buffer size in the Options pane:



And you can adjust the scrollable output via Screen Buffer Height in the Layout pane:



This will get you a history via the up and down arrows, but only within your current session. It will not be preserved across sessions.