Created
August 31, 2013 03:00
-
-
Save danielglh/6395977 to your computer and use it in GitHub Desktop.
pg_helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pg() { | |
if [[ $@ == "log" ]]; then | |
command less /usr/local/var/postgres/default/server.log | |
elif [[ $@ == "start" || $@ == "stop" || $@ == "restart" ]]; then | |
command pg_ctl -D /usr/local/var/postgres/default -l /usr/local/var/postgres/default/server.log $@ | |
else | |
echo "Wrong pg command!" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment