Greenplum Database Client Applications

A newer version of this documentation is available. Use the version menu above to view the most up-to-date release of the Greenplum 6.x documentation.

Greenplum Database Client Applications

Greenplum Database comes installed with a number of client utility applications located in the $GPHOME/bin directory of your Greenplum Database master host installation. The following are the most commonly used client utility applications:

Table 1. Commonly used client applications
Name Usage
createdb create a new database
createlang define a new procedural language
createuser define a new database role
dropdb remove a database
droplang remove a procedural language
dropuser remove a role
psql PostgreSQL interactive terminal
reindexdb reindex a database
vacuumdb garbage-collect and analyze a database
Note: createlang and droplang are deprecated and might be removed in a future release. These utilities are no longer used in Pivotal Greenplum Database, and they will display an error if you attempt to use them to install a Greenplum procedural language. Use the CREATE EXTENSION or DROP EXTENSION command instead.

When using these client applications, you must connect to a database through the Greenplum master instance. You will need to know the name of your target database, the host name and port number of the master, and what database user name to connect as. This information can be provided on the command-line using the options -d, -h, -p, and -U respectively. If an argument is found that does not belong to any option, it will be interpreted as the database name first.

All of these options have default values which will be used if the option is not specified. The default host is the local host. The default port number is 5432. The default user name is your OS system user name, as is the default database name. Note that OS user names and Greenplum Database user names are not necessarily the same.

If the default values are not correct, you can set the environment variables PGDATABASE, PGHOST, PGPORT, and PGUSER to the appropriate values, or use a psql ~/.pgpass file to contain frequently-used passwords.

For information about Greenplum Database environment variables, see the Greenplum Database Reference Guide. For information about psql, see the Greenplum Database Utility Guide.