Re: send psql output to file and setting pager=more

From: "Andrej Ricnik-Bay" <andrej(dot)groups(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: send psql output to file and setting pager=more
Date: 2006-05-20 03:58:42
Message-ID: b35603930605192058n7f29ab31r43d45d49f27b972c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 5/20/06, kmh496 <kmh496(at)kornet(dot)net> wrote:
> hello list.
>
> these are just 2 very short questions.
>
> is it possible in psql to ......
> (1) i want it to stop after a screen of information.
> i.e. like mysql's "[mysqld] pager=more .." my.cnf directive.
>
> (2) also, i want to have the results show up on the screen and be tee-ed
> to a file. Oracle can do this, i don't remember if it's "set server
> output on" or something like that?
> i tried
> \g out
> but the file still had old information in it.
> ( \g defaults to cwd yes? )
What OS are you using postgres under?

Under Linux you can quite easily just run the command
non-interactively and actually paginate via less or more;

Alternatively, under psql (man psql for details :P) you can
use \pset pager less.

> thanks.
> joesph.
Cheers,
Andrej

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message kmh496 2006-05-20 07:21:05 Re: send psql output to file and setting pager=more
Previous Message kmh496 2006-05-20 00:28:46 send psql output to file and setting pager=more