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.19. constraint_table_usage #

檢視 constraint_table_usage 識別當前資料庫中被某個約束使用且由當前啟用的角色擁有的所有表。(這與檢視 table_constraints 不同,該檢視識別所有表約束及其定義的表。) 對於外部索引鍵約束,此檢視識別外部索引鍵引用的表。對於唯一鍵約束或主鍵約束,此檢視僅識別約束所屬的表。檢查約束和非空約束不包含在此檢視中。

表 35.17. constraint_table_usage

列 型別

描述

table_catalog sql_identifier

包含被某個約束使用的表的資料庫名稱 (總是當前資料庫)

table_schema sql_identifier

包含被某個約束使用的表的模式名稱

table_name sql_identifier

被某個約束使用的表的名稱

constraint_catalog sql_identifier

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

constraint_schema sql_identifier

包含約束的模式名稱

constraint_name sql_identifier

約束的名稱


提交更正

如果您在文件中發現任何不正確、與您對特定功能的實際體驗不符或需要進一步說明的內容,請使用 此表格 報告文件問題。