Skip site navigation (1) Skip section navigation (2)

Re: Proposal: psql force prompting on notty

From: Michael Mauger <mmaug(at)yahoo(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: psql force prompting on notty
Date: 2003-11-01 20:52:44
Message-ID: 20031101205244.89503.qmail@web60303.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
--- Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Manfred SpraulDate: 2003-11-01 21:09:13
Subject: Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL
Previous:From: Tom LaneDate: 2003-11-01 19:20:46
Subject: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5)

pgsql-patches by date

Next:From: Peter EisentrautDate: 2003-11-01 21:34:26
Subject: Re: Proposal: psql force prompting on notty
Previous:From: Peter EisentrautDate: 2003-11-01 18:21:08
Subject: Re: Proposal: psql force prompting on notty

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group