To disable pagination temporarily when you in the postgres command line:
=# \pset pager
This will toggle pagination, so you can use it again to go back to the normal mode. (The "=#" is just the prompt; type the stuff following that)To disable it when you start up psql:
$ psql -U admin db_name --pset pager=off
And finally, if you always want it to be off, you can add this to your `.bashrc` file:
alias psql='psql --pset pager=off'
Much obliged!
ReplyDeleteJust wanted to add that you can also do "\pset pager off" if you always want to turn the pager off regardless of what it's previous setting was.
ReplyDeleteJust to complement, instead of an alias you can setup ~/.psqlrc with "\pset pager off".
ReplyDeleteAlso, default less config is a bit annoying when you have many or long columns, so I tend do use: \setenv PAGER 'less -SFXC'