This is the mail archive of the
mailing list for the Cygwin project.
Re: call win32 psql from cygwin
- From: Andy Koppe <andy dot koppe at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 11 Oct 2009 20:02:31 +0100
- Subject: Re: call win32 psql from cygwin
- References: <email@example.com>
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: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple