Re: How to prevent clear screen when query finish ? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: How to prevent clear screen when query finish ?
Date
Msg-id 52026F48.90901@gmail.com
Whole thread Raw
In response to How to prevent clear screen when query finish?  (Condor <condor@stz-bg.com>)
Responses Re: How to prevent clear screen when query finish?  (Condor <condor@stz-bg.com>)
Re: How to prevent clear screen when query finish ?  (Alban Hertroys <haramrae@gmail.com>)
List pgsql-general
On 08/07/2013 08:53 AM, Condor wrote:
> Hello,
>
> sorry for dumb question, did any one can tell me how the hell I can
> remove clear screen after finish the sql query from console ?
> This probably have some idea, but for me look like very ... not good
> idea. When I run query from console like:
>
> SELECT * FROM table_x;
>
> I got the result ... with (END) and when I click key -> q for quit the
> result disappear and I can't scroll it back,
> if I need to check something again (change console do something, get one
> line and need to scroll back) and want to see my old result again, I
> need to run query
> again ... I never has this problem on Slackware, but today one of my
> partners give me a shell to his ubuntu server to fix something on database.
>

The pager is probably not set, see here for more info:

http://www.postgresql.org/docs/9.2/interactive/app-psql.html

pager
Controls use of a pager program for query and psql help output. If the
environment variable PAGER is set, the output is piped to the specified
program. Otherwise a platform-dependent default (such as more) is used.

When the pager option is off, the pager program is not used. When the
pager option is on, the pager is used when appropriate, i.e., when the
output is to a terminal and will not fit on the screen. The pager option
can also be set to always, which causes the pager to be used for all
terminal output regardless of whether it fits on the screen. \pset pager
without a value toggles pager use on and off.

>
> Cheers,
> Hristo S.
>
>


--
Adrian Klaver
adrian.klaver@gmail.com


pgsql-general by date:

Previous
From: Richard Broersma
Date:
Subject: Re: PostrgreSQL Commercial restrictions?
Next
From: Steve Atkins
Date:
Subject: Re: PostrgreSQL Commercial restrictions?