-U username -W
Connects to the remote host hostname (if the database server isn't located on the local system).
Specifies n as the number of the port that the client should connect to. Note that this is a lowercase p.
Prompts for a password after connecting to the database. In PostgreSQL 7 and later, password prompting is automatic if the server requests a password after a connection has been established.
Displays a help message.
Several more options are available in addition to those listed in Table 21.2. See the psql's man page for details on all the available options.
Was this article helpful?