Skip to content

Instantly share code, notes, and snippets.

@typeoneerror
Created July 25, 2011 16:50
Show Gist options
  • Save typeoneerror/1104559 to your computer and use it in GitHub Desktop.
Save typeoneerror/1104559 to your computer and use it in GitHub Desktop.
.bash_* postgreSQL 9.0 on Mac helpers
function pg_restart
{
echo "Restarting PostgreSQL server..."
sudo su postgres -c "/Library/PostgreSQL/9.0/bin/pg_ctl -wD /Library/PostgreSQL/9.0/data restart"
}
function pg_start
{
echo "Starting PostgreSQL server..."
sudo su postgres -c "/Library/PostgreSQL/9.0/bin/pg_ctl -wD /Library/PostgreSQL/9.0/data start"
}
function pg_status
{
sudo su postgres -c "/Library/PostgreSQL/9.0/bin/pg_ctl -D /Library/PostgreSQL/9.0/data status"
}
function pg_stop
{
echo "Stopping PostgreSQL server..."
sudo su postgres -c "/Library/PostgreSQL/9.0/bin/pg_ctl stop -wm smart -D /Library/PostgreSQL/9.0/data"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment