Supported Versions: Current (17) / 16 / 15 / 14 / 13
Development Versions: devel
Unsupported versions: 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4 / 7.3 / 7.2 / 7.1
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

pg_config

Name

pg_config -- Provides information about the installed version of PostgreSQL

Synopsis

pg_config {--bindir | --includedir | --libdir | --configure | --version...}

Description

The pg_config utility provides configuration parameters of the currently installed version of PostgreSQL. It is intended, for example, to be used by software packages that want to interface to PostgreSQL in order to find the respective header files and libraries.

To use pg_config, supply one or more of the following options:

--bindir

Print the location of user executables. Use this, for example, to find the psql program. This is normally also the location where the pg_config program resides.

--includedir

Print the location of C and C++ header files.

--libdir

Print the location of object code libraries.

--configure

Print the options that were given to the configure script when PostgreSQL was configured for building. This can be used to reproduce the identical configuration, or to find out with what options a binary package was built. (Note however that binary packages often contain vendor-specific custom patches.)

--version

Print the version of PostgreSQL and exit.

If more than one option (except for --version) is given, the information is printed in that order, one item per line.