2 35.52. table_constraints #
4 The view table_constraints contains all constraints belonging to tables
5 that the current user owns or has some privilege other than SELECT on.
7 Table 35.50. table_constraints Columns
13 constraint_catalog sql_identifier
15 Name of the database that contains the constraint (always the current
18 constraint_schema sql_identifier
20 Name of the schema that contains the constraint
22 constraint_name sql_identifier
24 Name of the constraint
26 table_catalog sql_identifier
28 Name of the database that contains the table (always the current
31 table_schema sql_identifier
33 Name of the schema that contains the table
35 table_name sql_identifier
39 constraint_type character_data
41 Type of the constraint: CHECK (includes not-null constraints), FOREIGN
42 KEY, PRIMARY KEY, or UNIQUE
44 is_deferrable yes_or_no
46 YES if the constraint is deferrable, NO if not
48 initially_deferred yes_or_no
50 YES if the constraint is deferrable and initially deferred, NO if not
54 YES if the constraint is enforced, NO if not
56 nulls_distinct yes_or_no
58 If the constraint is a unique constraint, then YES if the constraint
59 treats nulls as distinct or NO if it treats nulls as not distinct,
60 otherwise null for other types of constraints.