| PostgreSQL 9.3.4 文档 | ||||
|---|---|---|---|---|
| Prev | Up | Chapter 34. 信息模式 | Next | |
视图table_constraints包含属于特定表的所有约束,这些表要满足的条件是:当前用户拥有表或者是当前用户在表上具有某种除SELECT之外的特权。
Table 34-48. table_constraints列
| 名称 | 数据类型 | 描述 | 
|---|---|---|
| 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 |