3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
10 .TH "PG_CONFIG" "1" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 pg_config \- retrieve information about the installed version of PostgreSQL
33 .HP \w'\fBpg_config\fR\ 'u
34 \fBpg_config\fR [\fIoption\fR...]
39 utility prints configuration parameters of the currently installed version of
40 PostgreSQL\&. It is intended, for example, to be used by software packages that want to interface to
42 to facilitate finding the required header files and libraries\&.
46 pg_config, supply one or more of the following options:
50 Print the location of user executables\&. Use this, for example, to find the
52 program\&. This is normally also the location where the
59 Print the location of documentation files\&.
64 Print the location of HTML documentation files\&.
69 Print the location of C header files of the client interfaces\&.
72 \fB\-\-pkgincludedir\fR
74 Print the location of other C header files\&.
77 \fB\-\-includedir\-server\fR
79 Print the location of C header files for server programming\&.
84 Print the location of object code libraries\&.
89 Print the location of dynamically loadable modules, or where the server would search for them\&. (Other architecture\-dependent data files might also be installed in this directory\&.)
94 Print the location of locale support files\&. (This will be an empty string if locale support was not configured when
101 Print the location of manual pages\&.
106 Print the location of architecture\-independent support files\&.
111 Print the location of system\-wide configuration files\&.
116 Print the location of extension makefiles\&.
121 Print the options that were given to the
125 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\&.) See also the examples below\&.
130 Print the value of the
132 variable that was used for building
133 PostgreSQL\&. This shows the C compiler used\&.
138 Print the value of the
140 variable that was used for building
141 PostgreSQL\&. This shows C compiler switches needed at preprocessing time (typically,
148 Print the value of the
150 variable that was used for building
151 PostgreSQL\&. This shows C compiler switches\&.
156 Print the value of the
158 variable that was used for building
159 PostgreSQL\&. This shows extra C compiler switches used for building shared libraries\&.
164 Print the value of the
166 variable that was used for building
167 PostgreSQL\&. This shows linker switches\&.
172 Print the value of the
174 variable that was used for building
175 PostgreSQL\&. This shows linker switches used for building executables only\&.
180 Print the value of the
182 variable that was used for building
183 PostgreSQL\&. This shows linker switches used for building shared libraries only\&.
188 Print the value of the
190 variable that was used for building
191 PostgreSQL\&. This normally contains
193 switches for external libraries linked into
209 command line arguments, and exit\&.
211 If more than one option is given, the information is printed in that order, one item per line\&. If no options are given, all available information is printed, with labels\&.
216 \fB\-\-pkgincludedir\fR,
220 \fB\-\-sysconfdir\fR,
226 \fB\-\-ldflags_sl\fR, and
241 To reproduce the build configuration of the current PostgreSQL installation, run the following command:
247 eval \&./configure `pg_config \-\-configure`
254 pg_config \-\-configure
255 contains shell quotation marks so arguments with spaces are represented correctly\&. Therefore, using
257 is required for proper results\&.