5
Getting help
In the OS command line
$ psql --help
$ man psql
In psql
=> \? list of psql commands
=> \? variables  psql variables
=> \h[elp] list of SQL commands
=> \h command syntax of the SQL command
=> \q  quit
Reference information on psql can be obtained not only 
from the documentation, but also from within the system directly.
psql with the --help key displays a startup help message. If the 
documentation package is installed with the system, you can view the 
manual for psql using the man psql command.
psql can execute SQL commands as well as its own commands.
Inside psql, you can get a list and a brief description of all psql commands. 
All psql commands start with a backslash. 
The \help command provides a list of SQL commands that the server 
supports, as well as the syntax of an SQL command (if specified).
Another command that is useful to know, although it has nothing to do with 
the help, is \q, used to exit psql. Alternatively, you can also use the exit 
and quit commands to quit.