Monday, October 25, 2010

Better pager for psql/mysql client

Very nice tips I found today - http://merlinmoncure.blogspot.com/2007/10/better-psql-with-less.html

If you used psql or mysql client on the console a lot, it always a problem browsing through result set that much wider that your console width.

export PAGER=less
export LESS="-iMSx4 -FX"

Then just make sure your psql/mysql use the correct pager. For mysql, \P would set pager to "less".

No comments: