PostgreSQL

PostgreSQL cheat sheet

\l (lowercase L)list all databases
\cuse database
\dtshow tables
\dTlist datatypes
\dflist functions
\dilist indexes
\dvlist views
\dulist users
\d+show all tables with descriptions
\d+ tableshow table definition or view definition with column descriptions

Altering a table

Renaming a table

PostgreSQL

PostgreSQL also called Postgres is an object-relational database management system that focuses on extensibility and standards-compliance.

Installing PostgreSQL

This quick walk-through are my notes for installing the PostgreSQL database server and the PgAdmin administration application on Ubuntu Linux, and also set up the server so it allows access to other PC's on your network.

Right for the basic installation, at the command-line, enter the following commands (or search for the listed packages in synaptic if you prefer that way of working):