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

Re: viewing results in terminal on RedHat 6.1

From: Brett Parker <iDunno(at)sommitrealweird(dot)co(dot)uk>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: viewing results in terminal on RedHat 6.1
Date: 2011-06-03 13:31:49
Message-ID: 20110603133149.GE22717@miranda (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On 03 Jun 12:49, Campbell, Lance wrote:
> Postgres: 9.x
> On RedHat 4.x when I would access Postgres through a terminal for command line queries if the results of a queries exceeded more than 50+ lines I would still see the results after pressing "quit".  On RedHat 6.1 Workstation when I see queries that exceed some threshold 50+ when I press "quit" the screen clears away the results so that I can no longer see them.
> I also notice this behavior when I ssh into a server running postgres 8.4.x.  So the behavior seems to be isolated to Redhat 6.1 not the version of Postgres.
> Does anyone know how to tell RedHat 6.1 Workstation to not do this?

It seems that that's actually a problem with the pager (and it's not
really the pagers fault either)...

I'd guess you're using less as the pager, if so try (before starting
psql) doing:

    export LESS

If that "fixes" it for you, the issue is that the termcap init/deinit
for your terminal clears the output.

Brett Parker

In response to


pgsql-admin by date

Next:From: Kevin GrittnerDate: 2011-06-03 13:35:11
Subject: Re: - upgrade advice
Previous:From: Campbell, LanceDate: 2011-06-03 12:49:51
Subject: viewing results in terminal on RedHat 6.1

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