From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | Condor <condor(at)stz-bg(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to prevent clear screen when query finish ? |
Date: | 2013-08-07 16:01:12 |
Message-ID: | 52026F48.90901@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Atkins | 2013-08-07 16:04:16 | Re: PostrgreSQL Commercial restrictions? |
Previous Message | Richard Broersma | 2013-08-07 15:54:05 | Re: PostrgreSQL Commercial restrictions? |