历史版本。 PostgreSQL 9.1 已结束支持。 2016-10-27. 请参阅 当前版本手册.
34.48. table_constraints #
视图table_constraints包含当前用户拥有的或对其有某些非 SELECT 权限的表的所有约束。
表 34.46. table_constraints 列
| 名称 | 数据类型 | 描述 |
|---|---|---|
constraint_catalog | sql_identifier | 包含该约束的数据库名称(总是当前数据库) |
constraint_schema | sql_identifier | 包含该约束的模式名称 |
constraint_name | sql_identifier | 约束的名称 |
table_catalog | sql_identifier | 包含该表的数据库名称(总是当前数据库) |
table_schema | sql_identifier | 包含该表的模式名称 |
table_name | sql_identifier | 表的名称 |
constraint_type | character_data | 约束类型:CHECK(包括非空约束)、FOREIGN KEY、PRIMARY KEY 或 UNIQUE
|
is_deferrable | yes_or_no | 如果该约束是可延迟的,则为YES,否则为NO
|
initially_deferred | yes_or_no | 如果该约束是可延迟的且初始就被延迟,则为YES,否则为NO
|