<< | Contents | Managing Users >> Using PostgresqlConnecting to the SeverPostgreSQL like most modern DBMS uses a client/server model. The server manages the databases while the client provides an interface between the user and the database. The server is typically run as a daemon which is always running on the server system. To use the DBMS, you must connect the client to the server. With PostgreSQL, you use the psql -h serverhost -U username dbname where
Search PathAfter connecting to the server, you need to set the search path to the active schema. Otherwise, you will need to refer to preppend the schema name to the table names for every query. To set the search path, enter the command set search_path to schema_name; where set search_path to gradebook; Change PasswordTo change your password, use the \password You will be prompted for the new password. Enter a new password and press ENTER. Common CommandsThe command-line provided by the PostgreSQL client application is not only used to enter SQL commands, but also various DBMS commands. In PostgreSQL these commands between with a backslash (
|