Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xwy4O-0006iE-PH for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Dec 2014 18:57:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xwy4N-0002ps-Mv for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Dec 2014 18:57:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xwy4N-0002oV-1t for pgsql-bugs@postgresql.org; Fri, 05 Dec 2014 18:57:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xwy4E-0001rs-CD for pgsql-bugs@postgresql.org; Fri, 05 Dec 2014 18:57:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sB5IvJxD020091; Fri, 5 Dec 2014 13:57:19 -0500 From: Tom Lane To: Ed Avis cc: "'bruce@momjian.us'" , "'pgsql-bugs@postgresql.org'" Subject: Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal) In-reply-to: <7E039918541B4C4183BFDB8F015C74302E43107B@WCL-EXCH02.wcl.local> References: <7E039918541B4C4183BFDB8F015C74302E43107B@WCL-EXCH02.wcl.local> Comments: In-reply-to Ed Avis message dated "Fri, 05 Dec 2014 18:37:47 +0000" Date: Fri, 05 Dec 2014 13:57:19 -0500 Message-ID: <20090.1417805839@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Ed Avis writes: >> Many shell scripts run from cron have a 'dumb' terminal value. > And these scripts should output directly and not run a pager -- so matching what is being suggested for 'dumb'. > In fact they already run without pager because their stdout is not a > tty. Right. It only matters when we think stdout is a tty. > What is being discussed here is what psql should do when it is writing to a tty, so interactive in some sense, but with TERM=dumb. Decades ago that would have meant a teleprinter terminal (or, perhaps, some ancient serial terminal or Minix 1.0). Nowadays it means running inside emacs or some other management program, so there is no need to run a pager. I am pretty hesitant about extending the emacs example to apply to *every* context where TERM=dumb, especially given the complete lack of field complaints in this area. I'm good with putting in a special hack for when we're sure we're inside emacs, but I don't think an adequate case has been made for assuming TERM=dumb means the opposite of what it appears to mean on its face. Especially not if there won't be a way for the user to override the choice. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs