pg_wrapper - wrapper for PostgreSQL client commands
client-program [--cluster version/cluster] [...]
(client-program: psql, createdb, dropuser, and all other client
programs installed in /usr/lib/postgresql/
version/bin
).
This program is run only as a link to names which correspond to PostgreSQL
programs in /usr/lib/postgresql/
version/bin
. It determines the
configured cluster and database for the user and calls the appropriate version
of the desired program to connect to that cluster and database, supplying any
specifed options to that command.
The target cluster is selected by the following means, in descending order of precedence:
~/.postgresqlrc
(see postgresqlrc(5)), if that
file exists
/etc/postgresql-common/user_clusters
(see
user_clusters(5)), if that file exists
If none of these rules match, pg_wrapper aborts with an error.
$PGCLUSTER
is set, its value (of the form version/cluster)
specifies the desired cluster, similar to the --cluster option. However, if
--cluster is specified, it overrides the value of $PGCLUSTER
.
/etc/postgresql-common/user_clusters
$HOME/.postgresqlrc
user_clusters(5), postgresqlrc(5)
Martin Pitt <mpitt@debian.org>