Re: psql: \pset pager 'always'?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: greg(at)turnstep(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: psql: \pset pager 'always'?
Date: 2002-09-18 14:01:11
Message-ID: 20020918140111.GB14601@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 18, 2002 at 01:40:42PM -0000, greg(at)turnstep(dot)com wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> > Can someone supply a patch to automatically invoke the pager if the
> > output width is greater than the screen? We already test for screen
> > rows but not for screen width.
>
> Easily done, but I am not sure that this is the right thing to do.
> A pager is designed to handle excess vertical input, but not all
> can handle excess horizontal input (the width). I suspect that doing
> so would not be a good idea for the same reason given to me when I
> asked "why not send everything to the pager?": some systems force you
> to specifically exit the pager; this can be real annoying for cases
> with small input.

While this is true, if you do a select whose output wraps because it is too
wide, getting it to go through "less -S" is extremely useful to have the
columns line up. OTOH, sending everything to the pager is annoying if the
result is only one value.

I'd be happy with an easier way to force the pager than "\g |less -S".
Perhaps if \g is specified without a filename, it defaults to the pager.
Would such a patch be accepted?

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-09-18 14:47:27 Re: [GENERAL] Still big problems with pg_dump!
Previous Message greg 2002-09-18 13:40:42 Re: psql: \pset pager 'always'?