Skip to content

Instantly share code, notes, and snippets.

@asvechkar
Created March 22, 2014 12:17
Show Gist options
  • Save asvechkar/9706297 to your computer and use it in GitHub Desktop.
Save asvechkar/9706297 to your computer and use it in GitHub Desktop.
Postgresql commands
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