<pre>
$ initdb -D $PGDATA --locale=C --encoding=UTF8
-$ vi $PGDATA/postgresql.conf
-shared_preload_libraries = 'pg_bigm'
-custom_variable_classes = 'pg_bigm'
-
$ pg_ctl -D $PGDATA start
$ psql -d <データベース名>
=# CREATE EXTENSION pg_bigm;
<ul>
<li>$PGDATAは、データベースクラスタのパスを決めて、そのパスで置き換えてください。</li>
<li>pg_bigmは、PostgreSQLで利用できるすべてのエンコーディングとロケールをサポートしています。</li>
-<li>postgresql.confで、<a href="http://www.postgresql.jp/document/current/html/runtime-config-resource.html#GUC-SHARED-PRELOAD-LIBRARIES">shared_preload_libraries</a>と<a href="http://www.postgresql.jp/document/9.1/html/runtime-config-custom.html#GUC-CUSTOM-VARIABLE-CLASSES">custom_variable_classes</a>にpg_bigmを設定するのは必須です。
- <ul>
- <li>PostgreSQL9.2以降ではcustom_variable_classesは存在しません。設定が必要なのはshared_preload_librariesだけです。</li>
- </ul>
-</li>
+<li>PostgreSQL9.1では、postgresql.confで<a href="http://www.postgresql.jp/document/9.1/html/runtime-config-custom.html#GUC-CUSTOM-VARIABLE-CLASSES">custom_variable_classes</a>にpg_bigmを設定する必要があります。</li>
<li>pg_bigmの登録には、<a href="http://www.postgresql.jp/document/current/html/sql-createextension.html">CREATE EXTENSION</a>を使います。 CREATE EXTENSIONはデータベース単位でモジュールを登録するため、pg_bigmを利用したいデータベースすべてにおいて登録が必要です。</li>
</ul>
<p>pg_bigmのインストールは以上で終わりです。</p>
<h3 id="delete_conf">postgresql.confの設定削除</h3>
<p>postgresql.confの以下の設定を削除します</p>
<ul>
-<li>shared_preload_libraries</li>
-<li>custom_variable_classes</li>
+<li>custom_variable_classes (PostgreSQL9.1のみ)</li>
<li>pg_bigm.* (pg_bigm.から名前が始まるパラメータ)</li>
</ul>
<pre>
$ initdb -D $PGDATA --locale=C --encoding=UTF8
-$ vi $PGDATA/postgresql.conf
-shared_preload_libraries = 'pg_bigm'
-custom_variable_classes = 'pg_bigm'
-
$ pg_ctl -D $PGDATA start
$ psql -d <database name>
=# CREATE EXTENSION pg_bigm;
<ul>
<li>Replace $PGDATA with the path to database cluster.</li>
<li>pg_bigm supports all PostgreSQL encoding and locale.</li>
-<li>In postgresql.conf, pg_bigm must be added into <a href="http://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-SHARED-PRELOAD-LIBRARIES">shared_preload_libraries</a> and <a href="http://www.postgresql.org/docs/current/static/runtime-config-custom.html#GUC-CUSTOM-VARIABLE-CLASSES">custom_variable_classes</a>.
- <ul>
- <li>In PostgreSQL 9.2 or later, you need to set only shared_preload_libraries because custom_variable_classes doesn't exist.</li>
- </ul>
-</li>
+<li>In PostgreSQL9.1, <a href="http://www.postgresql.org/docs/current/static/runtime-config-custom.html#GUC-CUSTOM-VARIABLE-CLASSES">custom_variable_classes</a> needs to be set to pg_bigm in postgresql.conf.</li>
<li><a href="http://www.postgresql.org/docs/current/static/sql-createextension.html">CREATE EXTENSION</a> pg_bigm needs to be executed in all the databases that you want to use pg_bigm in.</li>
</ul>
<h3 id="delete_conf">Reset postgresql.conf</h3>
<p>Delete the following pg_bigm related settings from postgresql.conf.</p>
<ul>
-<li>shared_preload_libraries</li>
-<li>custom_variable_classes</li>
+<li>custom_variable_classes (only PostgreSQL9.1)</li>
<li>pg_bigm.* (parameters which begin with pg_bigm)</li>
</ul>