sponsor Vim development Vim logo Vim Book Ad

vim-pgquery : Write and run PostgreSQL queries directly in plain Vim

 script karma  Rating 0/0, Downloaded by 3  Comments, bugs, improvements  Vim wiki

created by
Augusto Dantas
 
script type
utility
 
description
Write and run PostgreSQL queries directly in plain Vim.

Save named database connections, remember the selected connection for each file, and keep transactions open across query executions. Integrates with vim-dadbod and vim-dadbod-completion for smart SQL completion suggestions.

See :help pgquery for the complete reference.
 
install details
Install the repository with your plugin manager, or as a native Vim package:

git clone https://github.com/aldantas/vim-pgquery.git \\\\
  ~/.vim/pack/plugins/start/vim-pgquery
vim -u NONE -c \\'helptags ~/.vim/pack/plugins/start/vim-pgquery/doc\\' -c quit

Requirements
Vim 8 or Vim 9 with JSON support and +job for :DBExecute.
Vim\\'s +terminal feature for :DBTerminal.
PostgreSQL\\'s psql client installed and available in PATH.
Optional: vim-dadbod and vim-dadbod-completion for SQL completion.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-pgquery.zip 1.0 2026-11-04 9.0 Augusto Dantas Initial upload
ip used for rating: 216.73.216.215

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github