0

Here is how I reproduce the issue:

  1. Log onto psql and hit up arrow (shows last event from history as expected):

    mydb=> select * from some_table;

  2. Run any select query.

  3. Hit up arrow a second time (shows non-translated input from keyboard):

    mydb=> ^[[A

I'm using psql 10.11. Anyone have this issue before, or know how to fix it? Goal is for the up arrow to always show the last command from history.

user2263572
  • 5,435
  • 5
  • 35
  • 57
  • Is it possible that `select * from some_table;` printed special characters which changed terminal ? – Philippe May 04 '21 at 19:50
  • @Philippe only special characters are pluses, minuses, and pipes. – user2263572 May 04 '21 at 20:41
  • Just to be sure, can you try with the query `SELECT 1;` ? – Philippe May 04 '21 at 20:58
  • @Philippe same issue even with SELECT 1; – user2263572 May 04 '21 at 21:23
  • are you using cygwin or windows psql ? Are you running psql from Mintty or CMD ? – matzeri May 05 '21 at 02:31
  • @matzeri I'm using cygwin within a console2 terminal (and running psql within the console2 terminal). – user2263572 May 05 '21 at 12:33
  • Console2 is not a Cygwin package. Have you tried from Mintty ? Cygwin PSQL version is 12.x are you using a Windows 10.11 version ? https://cygwin.com/cgi-bin2/package-grep.cgi?grep=psql.exe&arch=x86_64 – matzeri May 05 '21 at 12:57
  • This is my exact setup https://www.bryanlor.com/blog/cygwin-tutorial-integrating-cygwin-console2-windows. PSQL version is 10.11. And I have not tried Mintty. If this doesn't work, sticking with pgadmin is not an issue. – user2263572 May 05 '21 at 13:35
  • Instead of Console2, can you start CMD window, run psql, just to see the same pb occurs ? – Philippe May 06 '21 at 09:16

0 Answers0