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

37.19. constraint_table_usage #

The view <literal>constraint_table_usage</literal> identifies all tables in the current database that are used by some constraint and are owned by a currently enabled role. (This is different from the view <literal>table_constraints</literal>, which identifies all table constraints along with the table they are defined on.) For a foreign key constraint, this view identifies the table that the foreign key references. For a unique or primary key constraint, this view simply identifies the table the constraint belongs to. Check constraints and not-null constraints are not included in this view. constraint_table_usageビューは、ある制約で使用され、かつ、現在有効なロールが所有する、現在のデータベース内の全てのテーブルを識別します (これは、全てのテーブル制約とそれを定義したテーブルを識別するtable_constraintsとは異なります)。 外部キー制約では、このビューは外部キーが参照するテーブルを示します。 一意性制約もしくは主キー制約では、このビューは単に制約が属するテーブルを示します。 検査制約と非NULL制約はこのビューには含まれません。

表37.17 constraint_table_usageの列

<title><structname>constraint_table_usage</structname> Columns</title>

Column Type 列 型

Description 説明

table_catalog sql_identifier

Name of the database that contains the table that is used by some constraint (always the current database) ある制約で使用されるテーブルを持つデータベースの名前です (常に現在のデータベースです)。

table_schema sql_identifier

Name of the schema that contains the table that is used by some constraint ある制約で使用されるテーブルを持つスキーマの名前です。

table_name sql_identifier

Name of the table that is used by some constraint ある制約で使用されるテーブルの名前です。

constraint_catalog sql_identifier

Name of the database that contains the constraint (always the current database) 制約を持つデータベースの名前です(常に現在のデータベースです)。

constraint_schema sql_identifier

Name of the schema that contains the constraint 制約を持つスキーマの名前です。

constraint_name sql_identifier

Name of the constraint 制約の名前です。