Skip to content
Snippets Groups Projects
  • Thomas G. Lockhart's avatar
    c05f29e8
    Augment the date/time examples in the User's Guide to reflect the newer · c05f29e8
    Thomas G. Lockhart authored
     capabilities of specifying time zones as intervals per SQL9x.
    Put refentrytitle contents on the same line as the tag.
     Otherwise, leading whitespace is propagated into the product, which
     (at least) messes up the ToC layout.
    Remove (some) docinfo tags containing dates. Best to omit if the dates
     are not accurate; maybe use CVS dates instead or leave them out.
    c05f29e8
    History
    Augment the date/time examples in the User's Guide to reflect the newer
    Thomas G. Lockhart authored
     capabilities of specifying time zones as intervals per SQL9x.
    Put refentrytitle contents on the same line as the tag.
     Otherwise, leading whitespace is propagated into the product, which
     (at least) messes up the ToC layout.
    Remove (some) docinfo tags containing dates. Best to omit if the dates
     are not accurate; maybe use CVS dates instead or leave them out.
pg_config-ref.sgml 4.44 KiB
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.10 2002/04/21 19:02:39 thomas Exp $ -->

<refentry id="app-pgconfig">
 <refmeta>
  <refentrytitle id="app-pgconfig-title">pg_config</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo>Application</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>pg_config</refname>
  <refpurpose>retrieve information about the installed version of <productname>PostgreSQL</></refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis>
   <command>pg_config</command>
   <group choice="req" rep="repeat">
    <arg>--bindir</arg>
    <arg>--includedir</arg>
    <arg>--includedir-server</arg>
    <arg>--libdir</arg>
    <arg>--pkglibdir</arg>
    <arg>--configure</arg>
    <arg>--version</arg>
   </group>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</>
  <para>
   The <application>pg_config</> utility prints configuration parameters
   of the currently installed version of <productname>PostgreSQL</>. It is
   intended, for example, to be used by software packages that want to interface
   to <productname>PostgreSQL</> to facilitate finding the required header files
   and libraries.
  </para>
 </refsect1>


 <refsect1>
  <title>Options</title>

  <para>
   To use <application>pg_config</>, supply one or more of the following options:
   <variablelist>
    <varlistentry>
     <term><option>--bindir</option></>
     <listitem>
      <para>
       Print the location of user executables. Use this, for example, to find
       the <application>psql</> program. This is normally also the location
       where the <filename>pg_config</> program resides.       
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--includedir</option></>
     <listitem>
      <para>
       Print the location of C and C++ header files of the client interfaces.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--includedir-server</option></>
     <listitem>
      <para>
       Print the location of C and C++ header files for server
       programming.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--libdir</option></>
     <listitem>
      <para>
       Print the location of object code libraries.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--pkglibdir</option></>
     <listitem>
      <para>
       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.)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--configure</option></>
     <listitem>
      <para>
       Print the options that were given to the <filename>configure</>
       script when <productname>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.)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--version</option></>
     <listitem>
      <para>
       Print the version of <productname>PostgreSQL</> and exit.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>

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


 <refsect1>
  <title>Notes</title>

  <para>
   The option <option>--includedir-server</option> is new in
   PostgreSQL 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>--includedir</option>.  To make your
   package handle both cases, try the newer option first and test the
   exit status to see whether it succeeded.
  </para>
  <para>
   In releases prior to PostgreSQL 7.1, before the
   <command>pg_config</command> came to be, a method for finding the
   equivalent configuration information did not exist.
  </para>
 </refsect1>


 <refsect1>
  <title>History</title>

  <para>
   The <command>pg_config</command> utility first appeared in PostgreSQL 7.1.
  </para>
 </refsect1>


 <refsect1>
  <title>See Also</title>

  <para>
   <citetitle>PostgreSQL Programmer's Guide</citetitle>
  </para>
 </refsect1>
</refentry>