Книги автора: Fedora™ Unleashed, 2008 edition
/ Книги автора: Fedora™ Unleashed, 2008 edition
/ honorato bonafe
Книга: Fedora™ Unleashed, 2008 edition
The PostgreSQL Command-Line Client
The PostgreSQL Command-Line Client
You invoke the PostgreSQL command-line client with the command psql
. Like mysql
, psql
can be invoked with the name of the database to which you would like to connect. Also like mysql
, psql
can take several options. These options are listed in Table 18.2.
TABLE 18.2 Command-Line Options to Use When Invoking psql
Option | Action |
---|---|
-h hostname |
Connects to the remote host hostname (if the database server isn't located on the local system). |
-p n |
Specifies n as the number of the port to which the client should connect. Note that this is a lowercase p. |
-U username |
Connects to the database as the user username . |
-W |
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 18.2. See the psql
's man page for details on all the available options.
Похожие страницы
- Creating Database Users in PostgreSQL
- Local GUI Client Access to a Database
- QLineEdit
- 4.4.4 The Dispatcher
- SERVER CLIENT MAPPING
- About the author
- Chapter 7. The state machine
- Appendix A. Detailed explanations of special commands
- Appendix E. Other resources and links
- Example NAT machine in theory
- The final stage of our NAT machine
- Compiling the user-land applications