2025年9月25日: PostgreSQL 18 釋出!
支援的版本: 當前 (18) / 17 / 16 / 15 / 14 / 13
開發版本: devel
不支援的版本: 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

35.32. key_column_usage #

檢視 key_column_usage 標識當前資料庫中所有被某些唯一約束、主鍵約束或外部索引鍵約束限制的列。檢查約束不包含在此檢視中。只顯示當前使用者有權訪問的列,即作為所有者或擁有某些許可權的列。

表 35.30. key_column_usage

列 型別

描述

constraint_catalog sql_identifier

包含約束的資料庫名稱(始終是當前資料庫)

constraint_schema sql_identifier

包含約束的模式名稱

constraint_name sql_identifier

約束的名稱

table_catalog sql_identifier

包含受此約束限制的列所在表的資料庫名稱(始終為當前資料庫)

table_schema sql_identifier

包含受此約束限制的列所在表的模式名稱

table_name sql_identifier

包含受此約束限制的列的表名稱

column_name sql_identifier

受此約束限制的列的名稱

ordinal_position cardinal_number

列在約束鍵中的序數位置(計數從 1 開始)

position_in_unique_constraint cardinal_number

對於外部索引鍵約束,被引用列在其唯一約束中的序數位置(計數從 1 開始);否則為 null


提交更正

如果您在文件中發現任何不正確之處、與您對特定功能的體驗不符之處或需要進一步澄清之處,請使用 此表單 報告文件問題。