Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal) - Mailing list pgsql-bugs

From Ed Avis
Subject Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
Date
Msg-id 7E039918541B4C4183BFDB8F015C74302E4DC4CA@WCL-EXCH02.wcl.local
Whole thread Raw
In response to Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)  (Bruce Momjian <bruce@momjian.us>)
Responses Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
List pgsql-bugs
Thanks Bruce M. for your offer to write a patch.  I looked at the psql cod=
e but it was a bit more complex than I expected (what program isn't?) so I=
 would be happy to take you up on your offer.

For detecting the emacs 'dumb' shell mode, where a pager doesn't make sens=
e, any of the suggested environment variable methods would work and I don'=
t think it matters which.

Of course this small change (and it is indeed a UI enhancement, not a bug)=
 has stirred up opinions.  The way I see it is that psql is trying to be f=
riendly by guessing whether the user wants to run a pager or not.  If it w=
ere written to be simple and correct (as is the right approach for core da=
tabase code) then it would never do such guessing; the pager would have to=
 be explicitly requested.  If psql is going to guess on the user's behalf,=
 it makes sense to do a good job.

--=20
Ed Avis <eda@waniasset.com>

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #12183: Memory leak in long running sessions
Next
From: Kevin Grittner
Date:
Subject: Re: BUG #12183: Memory leak in long running sessions