历史版本。 PostgreSQL 7.4 已结束支持。 请参阅 当前版本手册.
32.18. key_column_usage #
视图key_column_usage标识当前数据库中所有被某种唯一、主键或外键约束限制的列。检查约束不被包括在这个视图中。只有那些当前用户能够访问的列才会被显示(作为拥有者或具有某些权限)。
表 32.16. key_column_usage 的列
| 名称 | 数据类型 | 描述 |
|---|---|---|
constraint_catalog | sql_identifier | 包含该约束的数据库名称(总是当前数据库) |
constraint_schema | sql_identifier | 包含该约束的模式名称 |
constraint_name | sql_identifier | 约束的名称 |
table_catalog | sql_identifier | 包含被这个约束限制的列的表所在的数据库名称(总是当前数据库) |
table_schema | sql_identifier | 包含该列的表所在的模式名称 that is restricted by some constraint |
table_name | sql_identifier | 包含该列的表名称 that is restricted by some constraint |
column_name | sql_identifier | 列的名称 that is restricted by some constraint |
ordinal_position | cardinal_number | 该列在约束键中的顺序位置(从 1 开始计) |