]> begriffs open source - ai-pg/blob - full-docs/txt/infoschema-key-column-usage.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / infoschema-key-column-usage.txt
1
2 35.32. key_column_usage #
3
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.
9
10    Table 35.30. key_column_usage Columns
11
12    Column Type
13
14    Description
15
16    constraint_catalog sql_identifier
17
18    Name of the database that contains the constraint (always the current
19    database)
20
21    constraint_schema sql_identifier
22
23    Name of the schema that contains the constraint
24
25    constraint_name sql_identifier
26
27    Name of the constraint
28
29    table_catalog sql_identifier
30
31    Name of the database that contains the table that contains the column
32    that is restricted by this constraint (always the current database)
33
34    table_schema sql_identifier
35
36    Name of the schema that contains the table that contains the column
37    that is restricted by this constraint
38
39    table_name sql_identifier
40
41    Name of the table that contains the column that is restricted by this
42    constraint
43
44    column_name sql_identifier
45
46    Name of the column that is restricted by this constraint
47
48    ordinal_position cardinal_number
49
50    Ordinal position of the column within the constraint key (count starts
51    at 1)
52
53    position_in_unique_constraint cardinal_number
54
55    For a foreign-key constraint, ordinal position of the referenced column
56    within its unique constraint (count starts at 1); otherwise null