Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to be able to vertically scroll terminal to see all data from a large table

I'm trying to see all the data I have in a PostgreSQL table, but as there is plenty of data to make the data fit horizontally I use:

\x auto

and then:

SELECT * FROM table_name;

Nevertheless I can only see one record and cannot scroll but if I expand my terminal then I can see some more of that data but not all. How to see all the data using vertical scroll?

like image 601
Paulo Janeiro Avatar asked Nov 28 '16 11:11

Paulo Janeiro


1 Answers

You probably have paging on. If the pager you use is more (or less) you should be able to "list results" by pressing a space bar.

Run \pset pager off to switch paging off. This way psql will show you all rows and you will be able to scroll them vertically.

like image 85
Vao Tsun Avatar answered Oct 19 '22 23:10

Vao Tsun