PostgreSQL cheat sheet
\l (lowercase L) | list all databases |
\c | use database |
\dt | show tables |
\dT | list datatypes |
\df | list functions |
\di | list indexes |
\dv | list views |
\du | list users |
\d+ | show all tables with descriptions |
\d+ table | show table definition or view definition with column descriptions |
Altering a table
Renaming a table