This chapter elaborates on the available clients for PostgreSQL. Clients exist in order to provide a user interface to the PostgreSQL server (also called the backend).
The two most accessible clients for PostgreSQL are the command-line driven psql and a graphical alternative, PgAccess. The psql client is installed by default, while PgAccess requires specification of the --with-tcl option during compilation of the PostgreSQL source code (as mentioned in Chapter 2).
Basic information about the psql client is included in Chapter 4; this section documents more advanced information about the psql client. The topics covered include a complete list of command line options, and an explanation of each psql slash command. This section also contains information on how to load SQL input from external files, use the psql history, and substitute variables dynamically into SQL statements within psql.
Here is the complete syntax to start psql:
psql [ options ] [ dbname [ username ] ]
dbname value specifies the database
to initially connect to. The optional
specifies the PostgreSQL user to connect as. If either value is unspecified,
psql will default to a database and username with the same name as the
operating system user starting the program.
Additionally, several run-time
options can be set
by command-line flags. By default, psql understands both standard Unix
short options (e.g., -c), and GNU-style ...