psql commands
\q # quits out of psql CLI interface
\password postgres # assign password
\connect mydb # connect to a database
\l # List databases
\dX # DIsplay information about X
\? # SHow description of commands
Command line
/usr/bin/postgresql-setup --initdb # Initialize /var/lib/postgresl directory
createdb foo # Create a new database
dropdb foo # Drop the DB named foo
createuser # Creates a user
dropuser # Delete user
SQL statements
ALTER USER matty with PASSWORD 'dfsdfdsfdfdsfdsfds';