PostgreSQL 中文参考文档
🌐 英文原版 官方 ↗

35.52. table_constraints #

视图 table_constraints 包含当前用户拥有的、或 对其拥有 SELECT 之外的某些特权的表的全部 约束。

Table 35.50. \1 字段列说明

Column Type

Description

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

enforced yes_or_no

如果该约束被强制执行则为 YES,否则为 NO

nulls_distinct yes_or_no

如果该约束是一个唯一约束, 则该约束把空值视为互不相同时为 YES、视为相同时为 NO;其他类型的约束为 空。