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

Proposal: psql force prompting on notty

From: Michael Mauger <mmaug(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Proposal: psql force prompting on notty
Date: 2003-11-01 06:51:44
Message-ID: 20031101065144.28680.qmail@web60305.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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.  

I did a little research and it appears that the cause is that 
pset.notty is being set to false because stdin/stdout are not 
a tty (pgsql-server/src/bin/psql/startup.c).  I'd like to 
propose that an option be added to the psql command line to 
override the detection of the tty and force the prompting for 
commands on stdin.  

I believe the attached patch should add the option -I to psql 
and force the prompt to appear as if it were an interactive 
session regardless of the state of stdin/stdout.  I do not 
have a configuration available to properly test this however.

Please be sure to include me in any replies since I do not 
subscribe to this list.  TIA.

-- Michael

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

Attachment: interactive.diff
Description: text/plain (1.6 KB)

Responses

pgsql-hackers by date

Next:From: Richard SchillingDate: 2003-11-01 09:49:45
Subject: Re: postmaster startup failure
Previous:From: Tom LaneDate: 2003-11-01 05:19:22
Subject: Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5

pgsql-patches by date

Next:From: Claudio NatoliDate: 2003-11-01 08:42:21
Subject: Other Win32 TODO items?
Previous:From: Larry RosenmanDate: 2003-10-31 23:22:33
Subject: Re: UnixWare UP3 compiler detection patch

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