↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

支持中的版本: 当前版本 (18) / 17 / 16 / 15 / 14
开发中的版本: 19 / 20devel
已结束支持的版本: 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4
历史版本。 PostgreSQL 7.4 已结束支持。 请参阅 当前版本手册.

32.18. key_column_usage #

视图key_column_usage标识当前数据库中所有被某种唯一、主键或外键约束限制的列。检查约束不被包括在这个视图中。只有那些当前用户能够访问的列才会被显示(作为拥有者或具有某些权限)。

表 32.16. key_column_usage 的列

名称数据类型描述
constraint_catalogsql_identifier 包含该约束的数据库名称(总是当前数据库)
constraint_schemasql_identifier包含该约束的模式名称
constraint_namesql_identifier约束的名称
table_catalogsql_identifier 包含被这个约束限制的列的表所在的数据库名称(总是当前数据库)
table_schemasql_identifier 包含该列的表所在的模式名称 that is restricted by some constraint
table_namesql_identifier 包含该列的表名称 that is restricted by some constraint
column_namesql_identifier 列的名称 that is restricted by some constraint
ordinal_positioncardinal_number 该列在约束键中的顺序位置(从 1 开始计)

报告文档问题

阅读 上游文档. 反馈更正前请先核对 当前版本手册.