ok
Direktori : /opt/alt/postgresql11/usr/share/doc/alt-postgresql11-9.2.24/html/ |
Current File : //opt/alt/postgresql11/usr/share/doc/alt-postgresql11-9.2.24/html/app-pgconfig.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >pg_config</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REV="MADE" HREF="mailto:pgsql-docs@postgresql.org"><LINK REL="HOME" TITLE="PostgreSQL 9.2.24 Documentation" HREF="index.html"><LINK REL="UP" TITLE="PostgreSQL Client Applications" HREF="reference-client.html"><LINK REL="PREVIOUS" TITLE="pg_basebackup" HREF="app-pgbasebackup.html"><LINK REL="NEXT" TITLE="pg_dump" HREF="app-pgdump.html"><LINK REL="STYLESHEET" TYPE="text/css" HREF="stylesheet.css"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"><META NAME="creation" CONTENT="2017-11-06T22:43:11"></HEAD ><BODY CLASS="REFENTRY" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="5" ALIGN="center" VALIGN="bottom" ><A HREF="index.html" >PostgreSQL 9.2.24 Documentation</A ></TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A TITLE="pg_basebackup" HREF="app-pgbasebackup.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A HREF="reference-client.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="60%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="20%" ALIGN="right" VALIGN="top" ><A TITLE="pg_dump" HREF="app-pgdump.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="APP-PGCONFIG" ></A >pg_config</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN81956" ></A ><H2 >Name</H2 >pg_config -- retrieve information about the installed version of <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN ></DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN81962" ></A ><H2 >Synopsis</H2 ><P ><TT CLASS="COMMAND" >pg_config</TT > [<TT CLASS="REPLACEABLE" ><I >option</I ></TT >...]</P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN81967" ></A ><H2 >Description</H2 ><P > The <SPAN CLASS="APPLICATION" >pg_config</SPAN > utility prints configuration parameters of the currently installed version of <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. It is intended, for example, to be used by software packages that want to interface to <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > to facilitate finding the required header files and libraries. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN81973" ></A ><H2 >Options</H2 ><P > To use <SPAN CLASS="APPLICATION" >pg_config</SPAN >, supply one or more of the following options: <P ></P ></P><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="OPTION" >--bindir</TT ></DT ><DD ><P > Print the location of user executables. Use this, for example, to find the <TT CLASS="COMMAND" >psql</TT > program. This is normally also the location where the <TT CLASS="FILENAME" >pg_config</TT > program resides. </P ></DD ><DT ><TT CLASS="OPTION" >--docdir</TT ></DT ><DD ><P > Print the location of documentation files. </P ></DD ><DT ><TT CLASS="OPTION" >--htmldir</TT ></DT ><DD ><P > Print the location of HTML documentation files. </P ></DD ><DT ><TT CLASS="OPTION" >--includedir</TT ></DT ><DD ><P > Print the location of C header files of the client interfaces. </P ></DD ><DT ><TT CLASS="OPTION" >--pkgincludedir</TT ></DT ><DD ><P > Print the location of other C header files. </P ></DD ><DT ><TT CLASS="OPTION" >--includedir-server</TT ></DT ><DD ><P > Print the location of C header files for server programming. </P ></DD ><DT ><TT CLASS="OPTION" >--libdir</TT ></DT ><DD ><P > Print the location of object code libraries. </P ></DD ><DT ><TT CLASS="OPTION" >--pkglibdir</TT ></DT ><DD ><P > 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.) </P ></DD ><DT ><TT CLASS="OPTION" >--localedir</TT ></DT ><DD ><P > Print the location of locale support files. (This will be an empty string if locale support was not configured when <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > was built.) </P ></DD ><DT ><TT CLASS="OPTION" >--mandir</TT ></DT ><DD ><P > Print the location of manual pages. </P ></DD ><DT ><TT CLASS="OPTION" >--sharedir</TT ></DT ><DD ><P > Print the location of architecture-independent support files. </P ></DD ><DT ><TT CLASS="OPTION" >--sysconfdir</TT ></DT ><DD ><P > Print the location of system-wide configuration files. </P ></DD ><DT ><TT CLASS="OPTION" >--pgxs</TT ></DT ><DD ><P > Print the location of extension makefiles. </P ></DD ><DT ><TT CLASS="OPTION" >--configure</TT ></DT ><DD ><P > Print the options that were given to the <TT CLASS="FILENAME" >configure</TT > script when <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > 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. </P ></DD ><DT ><TT CLASS="OPTION" >--cc</TT ></DT ><DD ><P > Print the value of the <TT CLASS="VARNAME" >CC</TT > variable that was used for building <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. This shows the C compiler used. </P ></DD ><DT ><TT CLASS="OPTION" >--cppflags</TT ></DT ><DD ><P > Print the value of the <TT CLASS="VARNAME" >CPPFLAGS</TT > variable that was used for building <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. This shows C compiler switches needed at preprocessing time (typically, <TT CLASS="LITERAL" >-I</TT > switches). </P ></DD ><DT ><TT CLASS="OPTION" >--cflags</TT ></DT ><DD ><P > Print the value of the <TT CLASS="VARNAME" >CFLAGS</TT > variable that was used for building <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. This shows C compiler switches. </P ></DD ><DT ><TT CLASS="OPTION" >--cflags_sl</TT ></DT ><DD ><P > Print the value of the <TT CLASS="VARNAME" >CFLAGS_SL</TT > variable that was used for building <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. This shows extra C compiler switches used for building shared libraries. </P ></DD ><DT ><TT CLASS="OPTION" >--ldflags</TT ></DT ><DD ><P > Print the value of the <TT CLASS="VARNAME" >LDFLAGS</TT > variable that was used for building <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. This shows linker switches. </P ></DD ><DT ><TT CLASS="OPTION" >--ldflags_ex</TT ></DT ><DD ><P > Print the value of the <TT CLASS="VARNAME" >LDFLAGS_EX</TT > variable that was used for building <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. This shows linker switches used for building executables only. </P ></DD ><DT ><TT CLASS="OPTION" >--ldflags_sl</TT ></DT ><DD ><P > Print the value of the <TT CLASS="VARNAME" >LDFLAGS_SL</TT > variable that was used for building <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. This shows linker switches used for building shared libraries only. </P ></DD ><DT ><TT CLASS="OPTION" >--libs</TT ></DT ><DD ><P > Print the value of the <TT CLASS="VARNAME" >LIBS</TT > variable that was used for building <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. This normally contains <TT CLASS="LITERAL" >-l</TT > switches for external libraries linked into <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. </P ></DD ><DT ><TT CLASS="OPTION" >--version</TT ></DT ><DD ><P > Print the version of <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >. </P ></DD ><DT ><TT CLASS="OPTION" >-?</TT ><BR><TT CLASS="OPTION" >--help</TT ></DT ><DD ><P > Show help about <SPAN CLASS="APPLICATION" >pg_config</SPAN > command line arguments, and exit. </P ></DD ></DL ></DIV ><P> 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. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN82126" ></A ><H2 >Notes</H2 ><P > The option <TT CLASS="OPTION" >--includedir-server</TT > was added in <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > 7.2. In prior releases, the server include files were installed in the same location as the client headers, which could be queried with the option <TT CLASS="OPTION" >--includedir</TT >. To make your package handle both cases, try the newer option first and test the exit status to see whether it succeeded. </P ><P > The options <TT CLASS="OPTION" >--docdir</TT >, <TT CLASS="OPTION" >--pkgincludedir</TT >, <TT CLASS="OPTION" >--localedir</TT >, <TT CLASS="OPTION" >--mandir</TT >, <TT CLASS="OPTION" >--sharedir</TT >, <TT CLASS="OPTION" >--sysconfdir</TT >, <TT CLASS="OPTION" >--cc</TT >, <TT CLASS="OPTION" >--cppflags</TT >, <TT CLASS="OPTION" >--cflags</TT >, <TT CLASS="OPTION" >--cflags_sl</TT >, <TT CLASS="OPTION" >--ldflags</TT >, <TT CLASS="OPTION" >--ldflags_sl</TT >, and <TT CLASS="OPTION" >--libs</TT > were added in <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > 8.1. The option <TT CLASS="OPTION" >--htmldir</TT > was added in <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > 8.4. The option <TT CLASS="OPTION" >--ldflags_ex</TT > was added in <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > 9.0. </P ><P > In releases prior to <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > 7.1, before <TT CLASS="COMMAND" >pg_config</TT > came to be, a method for finding the equivalent configuration information did not exist. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN82154" ></A ><H2 >Example</H2 ><P > To reproduce the build configuration of the current PostgreSQL installation, run the following command: </P><PRE CLASS="PROGRAMLISTING" >eval ./configure `pg_config --configure`</PRE ><P> The output of <TT CLASS="LITERAL" >pg_config --configure</TT > contains shell quotation marks so arguments with spaces are represented correctly. Therefore, using <TT CLASS="LITERAL" >eval</TT > is required for proper results. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="app-pgbasebackup.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="app-pgdump.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >pg_basebackup</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="reference-client.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >pg_dump</TD ></TR ></TABLE ></DIV ></BODY ></HTML >