]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/postgres/postgres.plugin.zsh
initial
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / postgres / postgres.plugin.zsh
1 # Aliases to control Postgres
2 # Paths noted below are for Postgres installed via Homebrew on OSX
3 if (( ! $+commands[brew] )); then
4   return
5 fi
6
7 local PG_BREW_DIR=$(brew --prefix)/var/postgres
8
9 alias startpost="pg_ctl -D $PG_BREW_DIR -l $PG_BREW_DIR/server.log start"
10 alias stoppost="pg_ctl -D $PG_BREW_DIR stop -s -m fast"
11 alias restartpost="stoppost && sleep 1 && startpost"
12 alias reloadpost="pg_ctl reload -D $PG_BREW_DIR -s"
13 alias statuspost="pg_ctl status -D $PG_BREW_DIR -s"