To install PostgreSQL on your virtual server, connect to your server via Telnet or SSH and run the following command: % vinstall pgsql The PostgreSQL installation includes all the necessary PostgreSQL files, initializes a database with the same name as your user name, and activates the postmaster daemon. Several wrapper scripts are available for all PostgreSQL commands. The wrapper scripts are automatically created when PostgreSQL is installed. PostgreSQL is installed in a version-specific directory (~/usr/local/pgsql-7.X.X) and a symlink named pgsql is created that points to that directory. ConfigurationIf you choose to configure PostgreSQL, add the following lines to your shell startup file, according to which shell your server is running.
The psql ClientThe main tool for using PostgreSQL is the psql client. To start psql use this command: % psql The psql client will start up and you will be able to type in SQL code and ask for help.
Multi-Language Abilities in PostgreSQLPostgreSQL allows for a number of languages by enabling specific character-sets in the databases. When you create a database in PostgreSQL, you can use the -E flag to enable support for a specific character set. % initdb -E SET The following is a list of the available character sets and the SET name to use to enable support for it.
Removing PostgreSQLTo remove PostgreSQL from your server, connect to it via Telnet or SSH and do the following: % vuninstall pgsql Edit your ~/etc/rc file, removing the line that contains postmaster. Run the ps command, like this: % ps -x Determine the process ID of the PostgreSQL daemon and use kill to stop the PostgreSQL daemon: % kill PROCESS-ID |