TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Improve your PostgreSQL workflow with vim and dbext

3 pointsby jmsmistralover 9 years ago

2 comments

cadiolisover 9 years ago
Some other tips for using vim and dbext.<p>1. Since it is using psql, you can run things like `\dt` to show a list of tables. See the psql docs for all the commands available.<p>2. your .psqlrc is now your friend. Check my psqlrc for some ideas [1]. For example I use `\pset null ¤` to render nulls and also `\pset linestyle unicode` and `\pset border 2` for better table rendering<p>3. Variables in psql are super handy. See the examples in my psqlrc but for example I can execute `:ps` in vim&#x2F;dbext and it runs the query I have defined against against the &#x27;ps&#x27; variable in my psqlrc which is a query similar to the pgAdmin server status window<p>4. Recommend <a href="https:&#x2F;&#x2F;github.com&#x2F;krisajenkins&#x2F;vim-postgresql-syntax" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;krisajenkins&#x2F;vim-postgresql-syntax</a> for syntax highlighting on psql output. See the function DBextPostResult in my vimrc (in dotfiles below) on how to enable.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;collinpeters&#x2F;dotfiles&#x2F;blob&#x2F;master&#x2F;psql&#x2F;psqlrc.symlink" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;collinpeters&#x2F;dotfiles&#x2F;blob&#x2F;master&#x2F;psql&#x2F;ps...</a>
评论 #11043322 未加载
domnabanover 9 years ago
That&#x27;s pretty neat!