Re: psql output Horizontal scrollable ?

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Cc: franksub2005(at)yahoo(dot)com
Subject: Re: psql output Horizontal scrollable ?
Date: 2005-11-11 17:53:00
Message-ID: d6d03e4214ef2e9b3a7aadf6e2a53f2a@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I am new to this database, so forgive me if this is too novice.
> I would like to know if there is any way to set the psql command
> output horizontal scrollable ?

One solution is to check out the "expanded" output mode, which can
be very handy in psql. Just toggle it on and off with \x

As far as the scrolling, that is set to whatever your pager is
set to. On unix-like systems, this is set with the environment
variable PAGER. The popular pager called "less" has horizontal
scrolling capability: just hit the right arrow and you will switch
to that mode. Another thing you may want to do is make sure the
pager is always used by psql by setting "\pset pager always"

So in summary, try this:

export PAGER=less
(call psql)
\pset pager always
(run your commands, hit the right arrow)

If you find yourself using the same commands all the time, such
as \pset pager always, you can add them to your .psqlrc file
(in your home directory) and they will be called automatically each
time you start psql.

All of the above assumes a bash shell on a unixy system, so if it
does not work for you, let us know what OS you are running on for
a better answer.

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200511111250
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFDdNpXvJuQZxSWSsgRAlMSAKDwNLhTQJ42GZbKJbKIF5NHCt28UQCffPuP
75utEbOUrN02PYhMjK/Unzg=
=huVd
-----END PGP SIGNATURE-----

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Emiliano Amilcarelli 2005-11-12 08:06:31 Loop through records
Previous Message Sean Davis 2005-11-11 17:09:09 Re: psql output Horizontal scrollable ?