I recommend using <i>pspg</i> in conjunction with <i>pgcli</i>.<p>To install pgcli, simply "pip install pgcli" at the command line.<p>When you pip install pgcli, the config file is located in ~/.config/pgcli/config<p>- The pager config line, which by default is commented out. You can define the pager to use pspg here, or leave it commented out and simply add something like this to your shell rc file: export PAGER="pspg -s 2"<p>- Check out syntax_style (I like monokai)<p>from within a pgcli terminal, F4 lets you switch into VIM mode<p>Also, play around with the table format in the pgcli config. I have yet to find a solid line grid but haven't stopped looking for it yet.<p>then, you get to combine the power of pgcli with pspg, for ultimate powahhhhh
It's so good that people still write high quality command line utilities in the time everybody runs copies of browser engines for their editor and messenger on the desktop (refereing to Electron, Atom, Slack). Especially when managing servers over ssh (or ssh tunneled throught ssh tunneled thought ssh), good utilities are invaluable.
Not bad but i like pgcli (pgcli.com) display of tabular data better. besides it is not just that, it is such a nice command line tool for pg. That autocomplete is a killer!
> Everybody who uses psql uses less pager.<p>Huh, I need to look into psql using less[0][1]. But having a look at the links it seems running `psql` in `tmux` with `^b[` for back buffer access with vim keys and regex search is how "I solved" this problem.<p>But in all honesty I normally find myself in pgadmin4.<p>[0]: <a href="http://merlinmoncure.blogspot.co.za/2007/10/better-psql-with-less.html" rel="nofollow">http://merlinmoncure.blogspot.co.za/2007/10/better-psql-with...</a>
[1]: <a href="https://stackoverflow.com/questions/26257724/set-less-as-pager-in-psql" rel="nofollow">https://stackoverflow.com/questions/26257724/set-less-as-pag...</a>
Looks like a very interesting project. Could it be used with sqlite or Mysql?<p>Also interesting to note, that people refer to the blue colors as "Midnight Commander Theme". I knew them as the colors of Norton Commander. :-)
If one prefers to use vim as a pager for psql, try this:<p><a href="https://unencumberedbyfacts.com/2016/01/04/psql-vim-happy-face/" rel="nofollow">https://unencumberedbyfacts.com/2016/01/04/psql-vim-happy-fa...</a><p>I've been using it for a few months, and it works great for me.
Not bad, I like the column freeze feature.<p>If you have to use less, -S (on command line or inside less, it works in both places) turns off line wrapping. It makes wide result sets workable and you can scroll left and right (but no freezing, naturally).
I use it for some time. No need to challenge your eyes with long lines or json values anymore.
This kind of result presentation should be in each command line client. Very very useful.