Navigate Wide Query Output in YSQLSH Using Your Left and Right Arrow Keys

Using ysqlsh and annoyed by wrapping lines creating difficult-to-read outputs?

Try setting the PAGER environment variable, when starting ysqlsh (then you’ll be able to use your left and right arrow keys to navigate wide outputs).

Example:

Difficult to read wide output!

If I instead start ysqlsh setting the PAGER environment variable, I can then see a cleaner view of the wide data where each row is on a single line. You can navigatte right and left using the keyboard arrow keys!

				
					[root@cloud-server-0 yb2]# PAGER='less -S' ysqlsh -h 127.0.0.1 -c "SELECT * FROM wide_table LIMIT 3;"
				
			
A much easier "on the eyes" and way to navigate the wide data output!

Have Fun!

The Halloween decorations available at Lowe's are getting more elaborate every year!