Skip to content

Instantly share code, notes, and snippets.

@westonplatter
Last active October 10, 2015 20:38
Show Gist options
  • Save westonplatter/3748116 to your computer and use it in GitHub Desktop.
Save westonplatter/3748116 to your computer and use it in GitHub Desktop.
postgres_notes

command line UI.

psql -h localhost  

other helpful commands

\du list users
CREATE DATABASE db_name;
CREATE ROLE postgres;
ALTER ROLE postgres WITH login;

When using Postgresql for a local Rails app, I had to explicitly note the host,

development: 
  host: localhost
  # etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment