2 35.32. key_column_usage #
4 The view key_column_usage identifies all columns in the current
5 database that are restricted by some unique, primary key, or foreign
6 key constraint. Check constraints are not included in this view. Only
7 those columns are shown that the current user has access to, by way of
8 being the owner or having some privilege.
10 Table 35.30. key_column_usage Columns
16 constraint_catalog sql_identifier
18 Name of the database that contains the constraint (always the current
21 constraint_schema sql_identifier
23 Name of the schema that contains the constraint
25 constraint_name sql_identifier
27 Name of the constraint
29 table_catalog sql_identifier
31 Name of the database that contains the table that contains the column
32 that is restricted by this constraint (always the current database)
34 table_schema sql_identifier
36 Name of the schema that contains the table that contains the column
37 that is restricted by this constraint
39 table_name sql_identifier
41 Name of the table that contains the column that is restricted by this
44 column_name sql_identifier
46 Name of the column that is restricted by this constraint
48 ordinal_position cardinal_number
50 Ordinal position of the column within the constraint key (count starts
53 position_in_unique_constraint cardinal_number
55 For a foreign-key constraint, ordinal position of the referenced column
56 within its unique constraint (count starts at 1); otherwise null