PSQL Account Management on Linux and OS X
The following topics provide information on Linux and OS X user accounts with respect to operation of PSQL. Use of the .bash shell is assumed, but similar instructions should apply to other shells.
After Installation Behavior
In addition to the instructions under Using Utilities from Users Other Than psql, users other than ROOT must be a member of the group pvsw to perform functionality with the following utilities:
The User Environment
The single environment variable $PVSW_ROOT is used to determine the location of installed components.
The generic location for configuration files are $PVSW_ROOT/etc.
For executable files, the location is $PVSW_ROOT/bin.
For shared libraries (32-bit) the location is $PVSW_ROOT/lib; for shared libraries (64-bit) the location is $PVSW_ROOT/lib64.
We recommend that you add $PVSW_ROOT/bin to your PATH environment variable.
As described in the next topic, add $PVSW_ROOT/lib64 to LD_LIBRARY_PATH on Linux and to DYLD_LIBRARY_PATH on OS X.
If you are using the 32-bit Client Access package, you also must add $PVSW_ROOT/lib to LD_LIBRARY_PATH. This 32-bit package is not supported on OS X.
Using Utilities from Users Other Than psql
To use utilities from user accounts other than psql, you must first make modifications to the user account configuration. Copy the lines from the following example to either the profile for a specific user or to the /etc profile that all users inherit.
/home/username/.bash_profile
/Users/username/.bash_profile
Look for this file in /home/username on Linux or in /Users/username on OS X.
Examples of a Modified Profile
Be sure to export all variables specific to PSQL.
Linux
PVSW_ROOT=/usr/local/psql
PATH=$PATH:$PVSW_ROOT/bin:/bin:/usr/bin
LD_LIBRARY_PATH=$PVSW_ROOT/lib64:$PVSW_ROOT/lib:$PVSW_ROOT/bin:/usr/lib
MANPATH=$MANPATH:$PVSW_ROOT/man
OS X
PVSW_ROOT=/usr/local/psql
PATH=$PATH:$PVSW_ROOT/bin:/bin:/usr/bin
DYLD_LIBRARY_PATH=$PVSW_ROOT/lib64:$PVSW_ROOT/lib:$PVSW_ROOT/bin:/usr/lib
MANPATH=$MANPATH:$PVSW_ROOT/man