This section is from the "Practical PostgreSQL" book, by John Worsley and Joshua Drake. Also available from Amazon: Practical PostgreSQL.
Like most network-capable database servers, PostgreSQL fits very strongly into a client-server paradigm. The heart of PostgreSQL is the server back-end process named postmaster . It is called a "back-end" because it is not meant to be interfaced with directly by a user.
When you start the PostgreSQL service, the postmaster process starts running in the background, listening to a specific TCP/IP port for connections from clients . Unless explicitly configured, postmaster will bind, or listen, on port 5432.
There are several interfaces available for client connectivity to the postmaster . For our examples, this book will rely on the most portable and readily accessed client distributed with PostgreSQL, which is psql .
Sometimes called the interactive monitor , or interactive terminal , psql is the command-line client distributed with PostgreSQL. With psql , you have a simple but powerful tool with which you can directly interface with the PostgreSQL server and begin exploring SQL through PostgreSQL.
 
Continue to: