Created
August 26, 2012 12:27
-
-
Save leandrosilva/3478465 to your computer and use it in GitHub Desktop.
Reminders on Postgres
This file contains 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
$ 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 |
This file contains 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
# 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