Retrieving information about the installed version of Greenplum Database
pg_config utility prints configuration parameters of the currently installed version of Greenplum Database.
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.
--docdir => Print the location of documentation files.
--includedir =>Print the location of C header files of the client interfaces.
--pkgincludedir =>Print the location of other C header files.
--includedir-server=>Print the location of C header files for server programming.
--libdir=>Print the location of object code libraries.
--pkglibdir=>Print the location of dynamically loadable modules, or where the server would search for them. (Other architecture-dependent data files may also be installed in this directory.)
--localedir=>Print the location of locale support files.
--mandir=>Print the location of manual pages.
--sharedir=>Print the location of architecture-independent support files.
--sysconfdir=>Print the location of system-wide configuration files.
--pgxs=>Print the location of extension makefiles.
--configure=>Print the options that were given to the configure script when Greenplum Database was configured for building.
--cc=>Print the value of the CC variable that was used for building Greenplum Database. This shows the C compiler used.
--cppflags=>Print the value of the CPPFLAGS variable that was used for building Greenplum Database. This shows C compiler switches needed at preprocessing time.
--cflags=>Print the value of the CFLAGS variable that was used for building Greenplum Database. This shows C compiler switches.
--cflags_sl=>Print the value of the CFLAGS_SL variable that was used for building Greenplum Database. This shows extra C compiler switches used for building shared libraries.
--ldflags=>Print the value of the LDFLAGS variable that was used for building Greenplum Database. This shows linker switches.
--ldflags_sl=>Print the value of the LDFLAGS_SL variable that was used for building Greenplum Database. This shows linker switches used for building shared libraries.
--libs=>Print the value of the LIBS variable that was used for building Greenplum Database. This normally contains -l switches for external libraries linked into Greenplum Database.
--version=>Print the version of Greenplum Database.
Running HELP on pg_config shows following options.
[gpadmin@sachi ]$ pg_config --help
pg_config provides information about the installed version of PostgreSQL.
Usage:
pg_config [OPTION]...
Options:
--bindir show location of user executables
--docdir show location of documentation files
--htmldir show location of HTML documentation files
--includedir show location of C header files of the client interfaces
--pkgincludedir show location of other C header files
--includedir-server show location of C header files for the server
--libdir show location of object code libraries
--pkglibdir show location of dynamically loadable modules
--localedir show location of locale support files
--mandir show location of manual pages
--sharedir show location of architecture-independent support files
--sysconfdir show location of system-wide configuration files
--pgxs show location of extension makefile
--configure show options given to "configure" script when PostgreSQL was built
--cc show CC value used when PostgreSQL was built
--cppflags show CPPFLAGS value used when PostgreSQL was built
--cflags show CFLAGS value used when PostgreSQL was built
--cflags_sl show CFLAGS_SL value used when PostgreSQL was built
--ldflags show LDFLAGS value used when PostgreSQL was built
--ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built
--libs show LIBS value used when PostgreSQL was built
--version show the PostgreSQL version
--help show this help, then exit
With no arguments, all known items are shown.
Report bugs to <pgsql-bugs@postgresql.org>.
Examples
To reproduce the build configuration of the current Greenplum Database installation, run the following command:eval ./configure 'pg_config --configure'
The output of pg_config --configure contains shell quotation marks so arguments with spaces are represented correctly. Therefore, using eval is required for proper results.