Postgres

From Wiki RB4

Operation

psql -h <HOSTNAME> -U <USER> [<DB>]
psql <DB> <USER>
  \l // show databases
  \c <DB> // connect to DB
  \d <TABLE> // show schema of table
  \dt // show tables
  <SQL>;
  CREATE DATABASE "<DB>"; // !!! SQL case sensitive, DB to be enclosed in " otherwise no case sensitiveness, semicolon needed
dropdb -h <HOSTNAME> -U <User> <DB>
createdb -h <HOSTNAME> -U <User> <DB>