他のバージョンの文書 15 | 14 | 13 | 12 | 11 | 10 | 9.6 | 9.5 | 9.4 | 9.3 | 9.2 | 9.1 | 9.0 | 8.4 | 8.3 | 8.2 | 8.1 | 8.0 | 7.4 | 7.3 | 7.2

E.245. リリース 1.01

リリース日: 1996-02-23

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

以下の注意は、Postgres95 1.0 からPostgres95 1.01 への移行を行うユーザ向けのものです。

新規にPostgres95 1.02.1 を使用し始める場合は古いデータベースを移行する必要はありませんので、これ以上読み続ける必要はありません。

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のバイナリが使用されるように設定します。

  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);

E.245.2. 変更点

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 key words
 * 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