[pgsql-jp: 30753] Re: テーブルの継承について

sugita @ sra.co.jp sugita @ sra.co.jp
2003年 8月 11日 (月) 22:38:08 JST


  杉田です。

From: "Han yp" <Hanyp @ dhc.com.cn>
Subject: [pgsql-jp: 30751] テーブルの継承について
Date: Mon, 11 Aug 2003 17:33:51 +0900

;;; 皆さん、こんにちは。

  こんばんは。

;;; 韓です。
;;; 
;;; 次のように親テーブルserviceを継承して、子テーブルservice_0を作成しています
;;; が、
;;; 親テーブルserviceに二つの主キーがあるけど、子テーブルservice_0にないでした。
;;; 何故ですか、あるはずだと思います。

  PostgreSQL の継承の実装がそこまでできていないからです。マニュアルには、将来
おそらく修正されるとなっていますが、優先度は低いです。

;;; また、「Triggers: srvc0_trg」というのはどうな意味ですか。

  DDL はどのようにされていますか?

;;; どちら様が知ったら、お教えてくださいませんか。

  PostgreSQL の継承は、論理的な整合性が不充分なので、それを見極めて使わないと
破綻し易いです。安全なのは、PostgreSQL の継承を使わない事です。

;;; bs2=# \d service
;;;                 Table "public.service"
;;;    Column    |            Type             | Modifiers
;;; -------------+-----------------------------+-----------
;;;  type        | text                        | not null
;;;  id          | bigint                      | not null
;;;  name        | text                        | not null
;;;  apply_date  | date                        | not null
;;;  end_date    | date                        |
;;;  last_update | timestamp without time zone |
;;; Indexes: service_pk primary key btree (id, apply_date)
;;; 
;;; bs2=# \d service_0;
;;;                  Table "public.service_0"
;;;      Column     |            Type             | Modifiers
;;; ----------------+-----------------------------+-----------
;;;  type           | text                        | not null
;;;  id             | bigint                      | not null
;;;  name           | text                        | not null
;;;  apply_date     | date                        | not null
;;;  end_date       | date                        |
;;;  last_update    | timestamp without time zone |
;;;  target_service | bigint                      |
;;; Triggers: srvc0_trg


Kenji Sugita                                      




pgsql-jp メーリングリストの案内