Обсуждение: psql scroll horizontal
Hi, does anybody know how I can have psql scroll wide tables instead of wrapping them? At the moment it uses the pager if there are too many rows. But although I can scroll horizontal then, it still wraps some rows around. Additionally It would be nice, if the pager is used as soon as the width is to wide (independant from the amount of rows). TIA -- e-Trolley Sayegh & John, Nabil Sayegh Tel.: 0700 etrolley /// 0700 38765539 Fax.: +49 69 8299381-8 PGP : http://www.e-trolley.de
Nabil Sayegh <postgresql@e-trolley.de> writes: > Hi, > > does anybody know how I can have psql scroll wide tables instead of > wrapping them? > > At the moment it uses the pager if there are too many rows. But > although I can scroll horizontal then, it still wraps some rows > around. The problem is with your pager. Using less (set the PAGER environment variable to less) and setting the LESS environment variable to -S (see the less man page for details) will do the work. > > Additionally It would be nice, if the pager is used as soon as the > width is to wide (independant from the amount of rows). It would, indeed. Regards, Manuel.
Manuel Sugawara wrote: > Nabil Sayegh <postgresql@e-trolley.de> writes: > > >>Hi, >> >>does anybody know how I can have psql scroll wide tables instead of >>wrapping them? >> >>At the moment it uses the pager if there are too many rows. But >>although I can scroll horizontal then, it still wraps some rows >>around. > > > The problem is with your pager. Using less (set the PAGER environment > variable to less) and setting the LESS environment variable to -S (see > the less man page for details) will do the work. Thanks -S was exactly what I wanted. bye -- e-Trolley Sayegh & John, Nabil Sayegh Tel.: 0700 etrolley /// 0700 38765539 Fax.: +49 69 8299381-8 PGP : http://www.e-trolley.de
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > does anybody know how I can have psql scroll wide tables instead > of wrapping them? Use a pager that is capable of "wide" output. On many systems, this is accomplished by the program "less" Use "\pset pager always" inside of psql to force it to always invoke the pager. - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200402112300 -----BEGIN PGP SIGNATURE----- iD8DBQFAKvqUvJuQZxSWSsgRAl81AJ9qYx76Qnd0rFFKgB4SrU0MItR7QQCfVvbr T5newkyKR02seKuqcqOVCTE= =mZoS -----END PGP SIGNATURE-----