Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > bab02a23fa9f3df8d66a9a3231b50245 > files > 19

postgresql8.3-docs-8.3.6-2mdv2008.1.x86_64.rpm

<!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 8.3.6 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="PostgreSQL Client Applications"
HREF="reference-client.html"><LINK
REL="PREVIOUS"
TITLE="ecpg"
HREF="app-ecpg.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="2009-02-03T04:34:16"></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"
>PostgreSQL 8.3.6 Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="app-ecpg.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="app-ecpg.html"
>Fast Backward</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="app-pgdump.html"
>Fast Forward</A
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
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="AEN62714"
></A
><H2
>Name</H2
>pg_config&nbsp;--&nbsp;retrieve information about the installed version of <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
></DIV
><A
NAME="AEN62718"
></A
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN62720"
></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="AEN62725"
></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="AEN62731"
></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.  (This will be an empty
       string if <TT
CLASS="LITERAL"
>--without-docdir</TT
> was specified when
       <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> was built.)
      </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_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.
      </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
></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="AEN62866"
></A
><H2
>Notes</H2
><P
>   The option <TT
CLASS="OPTION"
>--includedir-server</TT
> was new 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
> are new in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> 8.1.
  </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="AEN62890"
></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-ecpg.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"
><SPAN
CLASS="APPLICATION"
>ecpg</SPAN
></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
>