リリース v1.01

バージョン 1.0 からバージョン 1.01 への移行

以下のメモは、postgres95 1.0 から postgres95 1.01 へデータベースの移 行を行なうユーザのためのものです。

postgres95 1.01 から新たに開始する、または、古いデータベースの移行を 必要としない場合、以降を読む必要はありません。

postgres95 バージョン 1.0 で作成したデータベースを使って、postgres95 バージョン 1.01 を動かすには、以下のステップが必要です。

  1. src/Makefile.global 内の NAMEDATALEN の定義を 16 に、OIDNAMELEN を 20 に設定します。

  2. ホストを元にした認証を行なうか否かを決定します。

    1. 行なう場合、データディレクトリの最上位ディレクトリ(通常は $PGDATA の 値)に "pg_hba" というファイルを作成します。 src/libpq/pg_hbaは、構文の例を示しています。

    2. ホストを元にした認証を行なわない場合、src/Makefile.global 内の以下の行 をコメントアウトして下さい。

      	HBA = 1

      ホストを元にした認証はデフォルトで有効になっていることに注意して下さい。 上の A もしくは B のステップを行なわなかった場合 1.01 が稼働するマシン 以外から 1.0 データベースへの接続ができなくなります。

  3. 1.01 をコンパイル、インストールします。しかし、initdb の処理は行 なわないで下さい。

  4. 他のことをする前に、1.0 の postmaster を終了させて下さい。そして、既 存の $PGDATA ディレクトリをバックアップして下さい。

  5. PGDATA 環境変数を 1.0 データベースに設定して下さい。しかし、1.01 の バイナリを使用するように path は最新を参照するように設定して下さい。

  6. $PGDATA/PG_VERSION ファイルを 5.0 から 5.1 に変更して下さい。

  7. 新しい 1.01 の postmaster を起動して下さい。

  8. 1.01 に新しく組み込まれた関数と演算子を 1.0 データベースに追加します。 既存の 1.0 データベースに対して新しい 1.01 サーバを実行し、添付された 問い合わせを適用し、1.0_to_1.01.sql ファイルに保存することでなされます。 psql を使用するとより簡単にできます。 1.0 データベースの名前が "testdb" であるとすると、

    	% psql testdb -f 1.0_to_1.01.sql
    その後に、次のコマンドを実行して下さい。(ここからカットアンドペースト して下さい。)
    -- add builtin functions that are new to 1.01
    
    create function int4eqoid (int4, oid) returns bool as 'foo'
    language 'internal';
    create function oideqint4 (oid, int4) returns bool as 'foo'
    language 'internal';
    create function char2icregexeq (char2, text) returns bool as 'foo'
    language 'internal';
    create function char2icregexne (char2, text) returns bool as 'foo'
    language 'internal';
    create function char4icregexeq (char4, text) returns bool as 'foo'
    language 'internal';
    create function char4icregexne (char4, text) returns bool as 'foo'
    language 'internal';
    create function char8icregexeq (char8, text) returns bool as 'foo'
    language 'internal';
    create function char8icregexne (char8, text) returns bool as 'foo'
    language 'internal';
    create function char16icregexeq (char16, text) returns bool as 'foo'
    language 'internal';
    create function char16icregexne (char16, text) returns bool as 'foo'
    language 'internal';
    create function texticregexeq (text, text) returns bool as 'foo'
    language 'internal';
    create function texticregexne (text, text) returns bool as 'foo'
    language 'internal';
    
    -- add builtin functions that are new to 1.01
    
    create operator = (leftarg = int4, rightarg = oid, procedure = int4eqoid);
    create operator = (leftarg = oid, rightarg = int4, procedure = oideqint4);
    create operator ~* (leftarg = char2, rightarg = text, procedure = char2icregexeq);
    create operator !~* (leftarg = char2, rightarg = text, procedure = char2icregexne);
    create operator ~* (leftarg = char4, rightarg = text, procedure = char4icregexeq);
    create operator !~* (leftarg = char4, rightarg = text, procedure = char4icregexne);
    create operator ~* (leftarg = char8, rightarg = text, procedure = char8icregexeq);
    create operator !~* (leftarg = char8, rightarg = text, procedure = char8icregexne);
    create operator ~* (leftarg = char16, rightarg = text, procedure = char16icregexeq);
    create operator !~* (leftarg = char16, rightarg = text, procedure = char16icregexne);
    create operator ~* (leftarg = text, rightarg = text, procedure = texticregexeq);
    create operator !~* (leftarg = text, rightarg = text, procedure = texticregexne);

詳細な変更点一覧

Incompatibilities:
 * 1.01 is backwards compatible with 1.0 database provided the user
   follow the steps outlined in the MIGRATION_from_1.0_to_1.01 file.
   If those steps are not taken, 1.01 is not compatible with 1.0 database.

Enhancements:
 * added PQdisplayTuples() to libpq and changed monitor and psql to use it
 * added NeXT port (requires SysVIPC implementation)
 * added CAST .. AS ... syntax
 * added ASC and DESC keywords
 * added 'internal' as a possible language for CREATE FUNCTION
   internal functions are C functions which have been statically linked
   into the postgres backend.
 * a new type "name" has been added for system identifiers (table names,
   attribute names, etc.)  This replaces the old char16 type.   The
   of name is set by the NAMEDATALEN #define in src/Makefile.global
 * a readable reference manual that describes the query language.
 * added host-based access control.  A configuration file ($PGDATA/pg_hba)
   is used to hold the configuration data.  If host-based access control
   is not desired, comment out HBA=1 in src/Makefile.global.
 * changed regex handling to be uniform use of Henry Spencer's regex code
   regardless of platform.  The regex code is included in the distribution
 * added functions and operators for case-insensitive regular expressions. 
   The operators are ~* and !~*.
 * pg_dump uses COPY instead of SELECT loop for better performance

Bug fixes:
 * fixed an optimizer bug that was causing core dumps when 
   functions calls were used in comparisons in the WHERE clause
 * changed all uses of getuid to geteuid so that effective uids are used
 * psql now returns non-zero status on errors when using -c
 * applied public patches 1-14