This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: call win32 psql from cygwin

2009/10/11 Sivaram Neelakantan:
> I installed the win32 binary of PostgreSQL 8.4 in C:/PostgreSQL.
> Launching mintty in cygwin and calling psql, the only thing that seems
> to work is the psql --help call.
> $/cygdrive/c/PostgreSQL/8.4/bin/psql Â-d mf -U sivaram
> simply waits till I hit Ctrl-C.

Win32 console programs often check whether their stdin/out is a
console device in order to decide whether to enter interactive mode.
Mintty, however, is based on Cygwin's pseudo terminal (pty) devices,
which are implemented using Windows pipes. Hence Win32 psql probably
enters non-interactive mode when run in mintty (or other pty-based

Lots more discussion about this here:

Three possible solutions:
1. Use the Cygwin version of Postgres, which can be installed through setup.exe
2. Check whether psql has an option to explicitly put it into interactive mode
3. Run it in the default Cygwin console

> Is it possible at all to use the win32 databases from shell scripts
> written in cygwin bash?

The issue above shouldn't affect scripts.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]