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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

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