Created
March 22, 2014 12:17
-
-
Save asvechkar/9706297 to your computer and use it in GitHub Desktop.
Postgresql commands
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
sudo -u postgres psql | |
CREATE DATABASE test_database; | |
CREATE USER test_user WITH password 'qwerty'; | |
GRANT ALL privileges ON DATABASE test_database TO test_user; | |
psql -h localhost test_database test_user | |
CREATE SEQUENCE user_ids; | |
CREATE TABLE users (id INTEGER PRIMARY KEY DEFAULT NEXTVAL('user_ids'), login CHAR(64), password CHAR(64)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment