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

37.32. key_column_usage #

The view <literal>key_column_usage</literal> identifies all columns in the current database that are restricted by some unique, primary key, or foreign key constraint. Check constraints are not included in this view. Only those columns are shown that the current user has access to, by way of being the owner or having some privilege. key_column_usageビューは、現在のデータベースにおいて、ある一意性制約、主キー制約、外部キー制約によって制限を受けている全ての列を示します。 検査制約はこのビューには含まれません。 現在のユーザが所有者である、または何らかの権限を持ち、アクセスできるテーブル内のこうした列のみがここに示されます。

表37.30 key_column_usageの列

<title><structname>key_column_usage</structname> Columns</title>

Column Type 列 型

Description 説明

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 制約の名前です。

table_catalog sql_identifier

Name of the database that contains the table that contains the column that is restricted by this constraint (always the current database) この制約によって制限を受ける列を持つテーブルを持つデータベースの名前です (常に現在のデータベースです)。

table_schema sql_identifier

Name of the schema that contains the table that contains the column that is restricted by this constraint この制約によって制限を受ける列を持つテーブルを持つスキーマの名前です。

table_name sql_identifier

Name of the table that contains the column that is restricted by this constraint この制約によって制限を受ける列を持つテーブルの名前です。

column_name sql_identifier

Name of the column that is restricted by this constraint この制約によって制限を受ける列の名前です。

ordinal_position cardinal_number

Ordinal position of the column within the constraint key (count starts at 1) 制約キー内の列の位置を(1から始まる)序数で表したものです。

position_in_unique_constraint cardinal_number

For a foreign-key constraint, ordinal position of the referenced column within its unique constraint (count starts at 1); otherwise null 外部キー制約では、一意性制約内部の被参照列の位置の序数(1から始まります)です。 その他の場合はNULLです。