TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Pspg – Postgres Pager

135 点作者 willlll超过 7 年前

13 条评论

jdonaldson超过 7 年前
&quot;If you like it, send a postcard from your home country to my address, please&quot;<p>My impression of the author went up 100%
评论 #15713285 未加载
Dowwie超过 7 年前
I recommend using <i>pspg</i> in conjunction with <i>pgcli</i>.<p>To install pgcli, simply &quot;pip install pgcli&quot; at the command line.<p>When you pip install pgcli, the config file is located in ~&#x2F;.config&#x2F;pgcli&#x2F;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=&quot;pspg -s 2&quot;<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&#x27;t stopped looking for it yet.<p>then, you get to combine the power of pgcli with pspg, for ultimate powahhhhh
ktpsns超过 7 年前
It&#x27;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.
评论 #15714251 未加载
vittore超过 7 年前
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!
评论 #15712441 未加载
评论 #15711638 未加载
评论 #15710812 未加载
oneweekwonder超过 7 年前
&gt; 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 &quot;I solved&quot; this problem.<p>But in all honesty I normally find myself in pgadmin4.<p>[0]: <a href="http:&#x2F;&#x2F;merlinmoncure.blogspot.co.za&#x2F;2007&#x2F;10&#x2F;better-psql-with-less.html" rel="nofollow">http:&#x2F;&#x2F;merlinmoncure.blogspot.co.za&#x2F;2007&#x2F;10&#x2F;better-psql-with...</a> [1]: <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;26257724&#x2F;set-less-as-pager-in-psql" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;26257724&#x2F;set-less-as-pag...</a>
rmetzler超过 7 年前
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 &quot;Midnight Commander Theme&quot;. I knew them as the colors of Norton Commander. :-)
digisth超过 7 年前
If one prefers to use vim as a pager for psql, try this:<p><a href="https:&#x2F;&#x2F;unencumberedbyfacts.com&#x2F;2016&#x2F;01&#x2F;04&#x2F;psql-vim-happy-face&#x2F;" rel="nofollow">https:&#x2F;&#x2F;unencumberedbyfacts.com&#x2F;2016&#x2F;01&#x2F;04&#x2F;psql-vim-happy-fa...</a><p>I&#x27;ve been using it for a few months, and it works great for me.
barrkel超过 7 年前
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).
评论 #15711772 未加载
iracic超过 7 年前
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.
agentultra超过 7 年前
Nice work! Cool project.<p>I like the combination of pgcli + pspg... now if there were only a way to graph stats a-la pgadmin!
Torgo超过 7 年前
I have been using this for an hour, and it&#x27;s already indispensable in my eyes.
abstrct超过 7 年前
Looks great! I&#x27;m excited to try this out
cup-of-tea超过 7 年前
This looks good, but why is it specific to postgres? Can&#x27;t something like this be used with any tabular data?
评论 #15720208 未加载
评论 #15734865 未加载