Skip to content

Instantly share code, notes, and snippets.

@leandrosilva
Created August 26, 2012 12:27
Show Gist options
  • Save leandrosilva/3478465 to your computer and use it in GitHub Desktop.
Save leandrosilva/3478465 to your computer and use it in GitHub Desktop.
Reminders on Postgres
$ psql -h 127.0.0.1 -d postgres
postgres=# CREATE USER fulano SUPERUSER;
postgres=# CREATE DATABASE fulano_development OWNER fulano;
postgres=# CREATE DATABASE fulano_test OWNER fulano;
postgres=# \q
# Start
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
# Stop
$ pg_ctl -D /usr/local/var/postgres stop -s -m fast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment