PostgreSQL (psql)
- Connect:
psql "postgres://user@host:5432/db" - Meta:
\dt(tables),\d table(schema),\l(databases) - Query: plain SQL; multi-line ends with
; - Output to file:
\o out.txt - Time queries:
\timing on - CSV export:
\copy (SELECT ...) TO 'x.csv' CSV HEADER