X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <82vdilg7vt.fsf@gmail.com> References: <82vdilg7vt DOT fsf AT gmail DOT com> Date: Sun, 11 Oct 2009 20:02:31 +0100 Message-ID: <416096c60910111202o2a87dab5qae56ec3e385d3f61@mail.gmail.com> Subject: Re: call win32 psql from cygwin From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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 =C2=A0-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 terminals). Lots more discussion about this here: http://code.google.com/p/mintty/issues/detail?id=3D56 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 m= ode 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. Andy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple