Opening PostgreSQL in Cygwin and MINTTY

I cannot open PSQL interactive mode using MINTTY or using the default Cygwin terminal, it just nods under the psql databasename and does nothing. The only way to get him to answer is ctrl + C. It works fine on the command line.

I know that for Python you need to enter the -i argument - is there a similar trick for Cygwin?

+2
cygwin mintty
Dec 05 '12 at 19:59
source share
2 answers

I had a similar problem with Mercurial (hg) + OpenSSH, Python and MinTTY, but in MSYS instead of CygWin. I had the same issue with mysql . However, as far as I can tell, this problem and my problem were caused by the fact that MinTTY did not process applications using the built-in functions of the Windows console.

I solved my problem by following the solution found in comment 64 https://code.google.com/p/mintty/issues/detail?id=56#c64

With winpty ( https://github.com/rprichard/winpty ) a project compiled and installed in my path, I managed to run native Python (in interactive mode), Mercurial and MySQL from the MinTTY shell without special assemblies or switches (e.g. python -i ). All I needed to add was console.exe or console before the python or hg command. For convenience, I added aliases such as alias hg="console.exe hg" , so I can use the same commands, regardless of whether I am in the Linux shell or the Windows MinTTY bash shell.

+2
Apr 19 '14 at 0:29
source share

I have the same problem. For some reason

 psql -l -h localhost -U postgres 

returns a list of data, but any other variation on psql just hangs in silence.




Edit: I found the answer here: how to configure psql command in cygwin?

Windows psql uses the functions of the Windows console; Cygwin works best in a terminal such as Console2, which does not support the Windows console API. So psql does not work with Cygwin at all. Need Cygwin to create client tools like psql

+1
Oct 28 '13 at 4:24
source share



All Articles