Re: Proposal: psql force prompting on notty - Mailing list pgsql-hackers

From Michael Mauger
Subject Re: Proposal: psql force prompting on notty
Date
Msg-id 20031101205244.89503.qmail@web60303.mail.yahoo.com
Whole thread Raw
In response to Re: Proposal: psql force prompting on notty  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
--- Peter Eisentraut <peter_e@gmx.net> wrote:
> Michael Mauger writes:
> 
> > I'm the maintainer of sql.el in GNU Emacs.  On both the Mac OS X
> > and the Windows/Cygwin platform we've had reports that psql run
> > under Emacs does not issue a prompt for commands.
> 
> Why can't you make the Emacs session behave like a terminal for psql?
> 

Discussion on emacs-devel indicates that there are some known issues with
pty support on the Mac OS X port which are being addressed.  The problem
however does still exist on the Windows platform.  

Emacs is not a Cygwin (Un*x emulation on Windows) executable (like psql
is) so it is not setting the psql process up in a way that cygwin
recognizes as being a pty-like environment.  Thus the isatty() on stdin
and stdout are returning false when run under Emacs.  

My proposed patch is small and overrides psql's detection of it's
environment when the user knows better.  

-- Michael

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


pgsql-hackers by date:

Previous
From: Michael Mauger
Date:
Subject: Re: Proposal: psql force prompting on notty
Next
From: "Jon Pastore"
Date:
Subject: suggestion for error statements