## pg-wrapper

pg-wrapper — manage Postgres Pro symbolic links

## Synopsis

`pg-wrapper` `links` { `update` | `remove` }

## Description

pg-wrapper is a shell script provided in the Postgres Pro distribution to manage Postgres Pro symbolic links for the provided programs and adjust the handling of SQL man pages on Linux systems. Since Postgres Pro is installed into `/opt/pgpro/std-10`, this is required to make client and server programs available in the standard system `PATH` and find the new SQL man pages. This setup is not performed automatically at installation time to avoid possible conflicts with other PostgreSQL-based products you may have installed, unless you have opted for using the `postgrespro-std-10` quick-install package.

pg-wrapper is provided as part of the `postgrespro-std-10-client` package. Once this package is installed, you can find pg-wrapper in the ``install-dir`/bin` directory, where `install-dir` is `/opt/pgpro/std-10`.

pg-wrapper must be run as root.

## Options

pg-wrapper accepts the following command-line arguments:

`links` {`update` | `remove`}

  Manage Postgres Pro symbolic links and SQL man pages:

  - `update` — create or replace symbolic links for server and client programs provided with Postgres Pro, as well as add SQL man pages to the man page configuration file.

  - `remove` — remove symbolic links and SQL man page support for the current Postgres Pro version.

## Notes

If you are installing Postgres Pro from the `postgrespro-std-10` package, pg-wrapper is invoked automatically.

If you are installing individual Postgres Pro packages, you can run this script manually to create symbolic links to the provided client and server programs, as well as add SQL man pages to the man page configuration file.

For parallel installations with other `PostgreSQL`-based products, `pg-wrapper` behavior depends on whether the update-alternatives utility is supported by your system and the already installed `PostgreSQL`-based product:

- If update-alternatives is supported, `pg-wrapper` adds symbolic links to Postgres Pro programs into the alternative system, in accordance with their priority, as well as adds SQL man pages to the man page configuration file. For details on how to change the alternatives system priorities, see the man page for update-alternatives on your system.

  If SQL man pages are already installed from a different product, the pages unique for the new installation will be displayed, while the previous installation will keep its priority for all the coinciding man pages. For the new SQL documentation to be displayed for all pages, you have to modify the system configuration, for example, change the `MANPATH` value.

- If update-alternatives is not supported, `pg-wrapper` updates the system configuration only if there are no conflicts with any programs or man pages already installed. Otherwise, pg-wrapper does not create or update any program links and skips SQL man page integration. In this case, you can either continue using the already available program versions and SQL man pages, or modify the `PATH` and `MANPATH` settings manually.

For details on binary installation specifics on Linux, see Section 16.1.