在Cygwin和MINTTY中打开PostgreSQL [英] Opening PostgreSQL in Cygwin and MINTTY

查看:216
本文介绍了在Cygwin和MINTTY中打开PostgreSQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法使用MINTTY或使用默认的Cygwin终端打开PSQL的交互模式,它只是在命令 psql databasename 下停止,并且什么也不做。获得它的响应的唯一方法是ctrl + C出来。

I can't seem to open the interactive mode of PSQL using MINTTY or using the default Cygwin terminal, it just stalls under the command psql databasename and does nothing. The only way to get it to respond is to ctrl+C out of it. It works fine in Command Prompt.

我知道对于Python你需要输入-i参数 - 是否有类似的骗局Cygwin?

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

推荐答案

我有一个类似的问题与Mercurial(hg)+ OpenSSH,Python和MinTTY,但在MSYS而不是CygWin。我有这个完全相同的问题与 mysql 以及。尽管如此,据我所知,这个和我的问题是由MinTTY造成的,不是处理使用本机Windows控制台功能的应用程序。

I had a similar issue with Mercurial (hg)+OpenSSH, Python and MinTTY, but under MSYS instead of CygWin. I had this exact same problem with mysql as well. Nonetheless, as far as I can tell, both this and my issue were caused by MinTTY not being to handle applications that uses the native Windows console functions.

我解决了我的问题通过遵循 https://代码的注释64中找到的解决方案。 google.com/p/mintty/issues/detail?id=56#c64

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

使用winpty( https://github.com/rprichard/winpty )项目编译并安装在我的路径,我能够运行本机 Python(在交互模式下),Mercurial和MySQL从MinTTY shell没有特殊的构建或开关(如 python -i )。我需要的是在 python console.exe console $ c>或 hg 命令。为了方便,我添加了别名,例如 alias hg =console.exe hg,因此我可以使用相同的命令,无论是在Linux shell还是Windows MinTTY bash shell。

With the winpty (https://github.com/rprichard/winpty) project compiled and installed in my path, I was able to run native Python (in interactive mode), Mercurial and MySQL from the MinTTY shell without special builds or switches (such as python -i). All I need was to append 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 whether I'm in a Linux shell or a Windows MinTTY bash shell.

这篇关于在Cygwin和MINTTY中打开PostgreSQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆