Back to Ohmyzsh

Postgres plugin

plugins/postgres/README.md

latest1.4 KB
Original Source

Postgres plugin

This plugin adds some aliases for useful Postgres commands.

:warning: this plugin works exclusively with Postgres installed via Homebrew on OSX because Postgres paths are hardcoded to /usr/local/var/postgres.

To use it, add postgres to the plugins array in your zshrc file:

zsh
plugins=(... postgres)

Aliases

AliasCommandDescription
startpostpg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log startStart postgres server
stoppostpg_ctl -D /usr/local/var/postgres stop -s -m fastStop postgres server
restartpoststoppost && sleep 1 && startpostRestart (calls stop, then start)
reloadpostpg_ctl reload -D /usr/local/var/postgres -sReload postgres configuration (some setting require restart)
statuspostpg_ctl status -D /usr/local/var/postgres -sCheck status of postgres server (running, stopped)