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

37.52. table_constraints #

The view <literal>table_constraints</literal> contains all constraints belonging to tables that the current user owns or has some privilege other than <literal>SELECT</literal> on. table_constraintsビューには、現在のユーザが所有する、または何らかのSELECT以外の権限を持つテーブルに属する全ての制約があります。

表37.50 table_constraintsの列

<title><structname>table_constraints</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 (always the current database) テーブルを持つデータベースの名前です(常に現在のデータベースです)。

table_schema sql_identifier

Name of the schema that contains the table テーブルを持つスキーマの名前です。

table_name sql_identifier

Name of the table テーブルの名前です。

constraint_type character_data

Type of the constraint: <literal>CHECK</literal>, <literal>FOREIGN KEY</literal>, <literal>PRIMARY KEY</literal>, or <literal>UNIQUE</literal> 制約の種類です。 CHECKFOREIGN KEYPRIMARY KEYUNIQUEのいずれかです。

is_deferrable yes_or_no

<literal>YES</literal> if the constraint is deferrable, <literal>NO</literal> if not 制約が遅延可能ならばYES。さもなくばNO

initially_deferred yes_or_no

<literal>YES</literal> if the constraint is deferrable and initially deferred, <literal>NO</literal> if not 制約が遅延可能で初期状態が遅延であればYES。さもなくばNO

enforced yes_or_no

Applies to a feature not available in <productname>PostgreSQL</productname> (currently always <literal>YES</literal>) PostgreSQLで利用できない機能に適用されるものです(現在は常にYESです)。

nulls_distinct yes_or_no

If the constraint is a unique constraint, then <literal>YES</literal> if the constraint treats nulls as distinct or <literal>NO</literal> if it treats nulls as not distinct, otherwise null for other types of constraints. 制約が一意性制約である場合、制約がNULLを区別して扱う場合はYES、制約がNULLを区別しないで扱う場合はNO、他の種類の制約の場合はNULLです。