I enjoy using psql with Tmux and Vim, using Vim to edit my queries and send them to psql in another Tmux pane. This is a fantastic workflow, far superior to a GUI like DBeaver in my opinion, but:
It doesn't take many columns for psql to be unable to show the results nicely, and wrapped lines in a psql output looks disastrous.
So far my options are:
Extended mode
With \x
you can see rows one at a time shown more like a JSON object. This is kind of OK but is terrible for comparing rows against one another.
Make the font smaller
With some merry bashing of ctrl -
I can sometimes zoom out far enough to get the results to show on a single line. Needless to say, this isn't really a workable solution
Make tmux chop the ends off long lines
As shown here it's possible to get Tmux to truncate rows instead of wrapping them.
This is great if I'm only interested in the first few columns. But it's not really a sustainable way of working. What if I want to compare columns at the end?
Can anyone think of any avenues I might explore that won't make my GUI-using colleagues laugh at me for my terribly inadequate way of viewing wide tables?
It doesn't have to be specific to psql or to Tmux. Maybe just a way to make the terminal wider generally.
less -S
lets you scroll left/right with the arrow keys.