Skip to content

Instantly share code, notes, and snippets.

@andyzinsser
Last active August 29, 2015 13:55
Show Gist options
  • Save andyzinsser/8718741 to your computer and use it in GitHub Desktop.
Save andyzinsser/8718741 to your computer and use it in GitHub Desktop.
Bare minimum commands for setting up postgres DB using psql
# All commands below are run within psql
psql
# List all roles
\du
# List all Databases
\list
# Adding a role 'august' with superuser privaleges
# list of all privaleges here: http://www.postgresql.org/docs/8.1/static/sql-createrole.html
CREATE ROLE august WITH SUPERUSER;
# Deleting a role
DROP ROLE august;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment