disable '-- More --' pager scrolling in psql

For a long time I have wanted to be able see the complete result-set of my query in psql (PostgreSQL's command-line utilty), instead of having press a key to proceed to next page, and see the result page by page!!! Went through the \? and the \help commands too, but they were of no help.

Finally, googling the string 'psql disable more scrolling' led me to this post, and all you have to do is

\pset pager

This command toggles the pager, hence psql will not prompt you to press a key to see further results.

But beware that on Windows systems, psql does not respond to Ctrl+C promptly; so if you have disables pager, and you have issued a query that returns a really huge result-set, probably your best friend would be 'Task Manager'>'End Process'!!!
Post a Comment