バージョンごとのドキュメント一覧

pg_config

pg_config <refpurpose>retrieve information about the installed version of <productname>PostgreSQL</productname></refpurpose> — インストールしたバージョンのPostgreSQLに関する情報を提供する

概要

pg_config [option...]

説明

<title>Description</title>

The <application>pg_config</application> utility prints configuration parameters of the currently installed version of <productname>PostgreSQL</productname>. It is intended, for example, to be used by software packages that want to interface to <productname>PostgreSQL</productname> to facilitate finding the required header files and libraries. pg_configユーティリティは、現在インストールしているバージョンのPostgreSQLの設定パラメータを表示します。 これは、例えばPostgreSQLとのインタフェースを持つソフトウェアパッケージが必要なヘッダファイルやライブラリを容易に検出できるように用意されたものです。

オプション

<title>Options</title>

To use <application>pg_config</application>, supply one or more of the following options: pg_configを使用するためには、以下のオプションを1つ以上指定します。

--bindir

Print the location of user executables. Use this, for example, to find the <command>psql</command> program. This is normally also the location where the <filename>pg_config</filename> program resides. ユーザコマンドの場所を表示します。 例えば、psqlプログラムを検索するために使用します。 これは通常、pg_configプログラムが存在するディレクトリでもあります。

--docdir

Print the location of documentation files. 文書ファイルの場所を表示します

--htmldir

Print the location of HTML documentation files. HTML文書ファイルの場所を表示します。

--includedir

Print the location of C header files of the client interfaces. クライアントインタフェースのCヘッダファイルの場所を表示します。

--pkgincludedir

Print the location of other C header files. その他のCヘッダファイルの場所を表示します。

--includedir-server

Print the location of C header files for server programming. サーバプログラム作成用のCヘッダファイルの場所を表示します。

--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 might also be installed in this directory.) 動的ローディング可能なモジュールの場所、またはそれをサーバが検索する場所を表示します。 (このディレクトリには、アーキテクチャに依存する他のデータファイルも存在する可能性があります。)

--localedir

Print the location of locale support files. (This will be an empty string if locale support was not configured when <productname>PostgreSQL</productname> was built.) ロケールサポートファイルの場所を表示します (PostgreSQLをロケールサポートなしで構築した場合は空文字列となります)。

--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. 拡張用Makefileの場所を表示します。

--configure

Print the options that were given to the <filename>configure</filename> script when <productname>PostgreSQL</productname> 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. PostgreSQLを構築する時にconfigureスクリプトに与えたオプションを表示します。 まったく同じ構築条件でPostgreSQLを再作成する時、あるいは、バイナリパッケージの構築時のオプションを知りたい時に有益です (バイナリパッケージには、ベンダ固有のカスタムパッチが含まれていることが多いので注意してください)。 後述の例も参照してください。

--cc

Print the value of the <varname>CC</varname> variable that was used for building <productname>PostgreSQL</productname>. This shows the C compiler used. PostgreSQLの構築時に使用されたCC変数の値を表示します。 使用したCコンパイラが表示されます。

--cppflags

Print the value of the <varname>CPPFLAGS</varname> variable that was used for building <productname>PostgreSQL</productname>. This shows C compiler switches needed at preprocessing time (typically, <literal>-I</literal> switches). PostgreSQLの構築時に使用されたCPPFLAGS変数の値を表示します。 事前処理時に必要としたCコンパイラのスイッチが表示されます。 (通常は-Iスイッチです。)

--cflags

Print the value of the <varname>CFLAGS</varname> variable that was used for building <productname>PostgreSQL</productname>. This shows C compiler switches. PostgreSQLの構築時に使用されたCFLAGS変数の値を表示します。 Cコンパイラスイッチが表示されます。

--cflags_sl

Print the value of the <varname>CFLAGS_SL</varname> variable that was used for building <productname>PostgreSQL</productname>. This shows extra C compiler switches used for building shared libraries. PostgreSQLの構築時に使用されたCFLAGS_SL変数の値を表示します。 共有ライブラリの構築に使用された追加のCコンパイラスイッチが表示されます。

--ldflags

Print the value of the <varname>LDFLAGS</varname> variable that was used for building <productname>PostgreSQL</productname>. This shows linker switches. PostgreSQLの構築時に使用されたLDFLAGS変数の値を表示します。 リンカスイッチが表示されます。

--ldflags_ex

Print the value of the <varname>LDFLAGS_EX</varname> variable that was used for building <productname>PostgreSQL</productname>. This shows linker switches used for building executables only. PostgreSQLの構築時に使用されたLDFLAGS_EX変数の値を表示します。 実行ファイルの構築のみに使用されたリンカスイッチが表示されます。

--ldflags_sl

Print the value of the <varname>LDFLAGS_SL</varname> variable that was used for building <productname>PostgreSQL</productname>. This shows linker switches used for building shared libraries only. PostgreSQLの構築時に使用されたLDFLAGS_SL変数の値を表示します。 共有ライブラリの構築のみに使用されたリンカスイッチが表示されます。

--libs

Print the value of the <varname>LIBS</varname> variable that was used for building <productname>PostgreSQL</productname>. This normally contains <literal>-l</literal> switches for external libraries linked into <productname>PostgreSQL</productname>. PostgreSQLの構築時に使用されたLIBS変数の値を表示します。 これには通常、PostgreSQLにリンクする外部ライブラリ用の-lスイッチが含まれます。

--version

Print the version of <productname>PostgreSQL</productname>. PostgreSQLのバージョンを表示します。

-?
--help

Show help about <application>pg_config</application> command line arguments, and exit. pg_configコマンドライン引数に関する説明を表示し、終了します。

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. 1つ以上のオプションが与えられた場合、指定したオプションの順番に従って1行に1つずつ情報を表示します。 オプションがない場合、すべての利用可能な情報をラベル付きで表示します。

注釈

<title>Notes</title>

The options <option>&#45;-docdir</option>, <option>&#45;-pkgincludedir</option>, <option>&#45;-localedir</option>, <option>&#45;-mandir</option>, <option>&#45;-sharedir</option>, <option>&#45;-sysconfdir</option>, <option>&#45;-cc</option>, <option>&#45;-cppflags</option>, <option>&#45;-cflags</option>, <option>&#45;-cflags_sl</option>, <option>&#45;-ldflags</option>, <option>&#45;-ldflags_sl</option>, and <option>&#45;-libs</option> were added in <productname>PostgreSQL</productname> 8.1. The option <option>&#45;-htmldir</option> was added in <productname>PostgreSQL</productname> 8.4. The option <option>&#45;-ldflags_ex</option> was added in <productname>PostgreSQL</productname> 9.0. オプション--docdir--pkgincludedir--localedir--mandir--sharedir--sysconfdir--cc--cppflags--cflags--cflags_sl--ldflags--ldflags_sl--libsPostgreSQL 8.1から追加されました。 オプション--htmldirPostgreSQL 8.4で追加されました。 オプション--ldflags_exPostgreSQL 9.0で追加されました。

<title>Example</title>

To reproduce the build configuration of the current PostgreSQL installation, run the following command: 使用中のPostgreSQLインストレーションの構築時の設定を再生成するには、以下のコマンドを実行します。

eval ./configure `pg_config --configure`

The output of <literal>pg_config &#45;-configure</literal> contains shell quotation marks so arguments with spaces are represented correctly. Therefore, using <literal>eval</literal> is required for proper results. pg_config --configureの出力にはシェルの引用符が含まれますので、空白を含む引数も正しく表現することができます。 したがって、正しく動作させるためにはevalが必要です。