]> begriffs open source - ai-pg/blob - full-docs/txt/infoschema-attributes.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / infoschema-attributes.txt
1
2 35.6. attributes #
3
4    The view attributes contains information about the attributes of
5    composite data types defined in the database. (Note that the view does
6    not give information about table columns, which are sometimes called
7    attributes in PostgreSQL contexts.) Only those attributes are shown
8    that the current user has access to (by way of being the owner of or
9    having some privilege on the type).
10
11    Table 35.4. attributes Columns
12
13    Column Type
14
15    Description
16
17    udt_catalog sql_identifier
18
19    Name of the database containing the data type (always the current
20    database)
21
22    udt_schema sql_identifier
23
24    Name of the schema containing the data type
25
26    udt_name sql_identifier
27
28    Name of the data type
29
30    attribute_name sql_identifier
31
32    Name of the attribute
33
34    ordinal_position cardinal_number
35
36    Ordinal position of the attribute within the data type (count starts at
37    1)
38
39    attribute_default character_data
40
41    Default expression of the attribute
42
43    is_nullable yes_or_no
44
45    YES if the attribute is possibly nullable, NO if it is known not
46    nullable.
47
48    data_type character_data
49
50    Data type of the attribute, if it is a built-in type, or ARRAY if it is
51    some array (in that case, see the view element_types), else
52    USER-DEFINED (in that case, the type is identified in
53    attribute_udt_name and associated columns).
54
55    character_maximum_length cardinal_number
56
57    If data_type identifies a character or bit string type, the declared
58    maximum length; null for all other data types or if no maximum length
59    was declared.
60
61    character_octet_length cardinal_number
62
63    If data_type identifies a character type, the maximum possible length
64    in octets (bytes) of a datum; null for all other data types. The
65    maximum octet length depends on the declared character maximum length
66    (see above) and the server encoding.
67
68    character_set_catalog sql_identifier
69
70    Applies to a feature not available in PostgreSQL
71
72    character_set_schema sql_identifier
73
74    Applies to a feature not available in PostgreSQL
75
76    character_set_name sql_identifier
77
78    Applies to a feature not available in PostgreSQL
79
80    collation_catalog sql_identifier
81
82    Name of the database containing the collation of the attribute (always
83    the current database), null if default or the data type of the
84    attribute is not collatable
85
86    collation_schema sql_identifier
87
88    Name of the schema containing the collation of the attribute, null if
89    default or the data type of the attribute is not collatable
90
91    collation_name sql_identifier
92
93    Name of the collation of the attribute, null if default or the data
94    type of the attribute is not collatable
95
96    numeric_precision cardinal_number
97
98    If data_type identifies a numeric type, this column contains the
99    (declared or implicit) precision of the type for this attribute. The
100    precision indicates the number of significant digits. It can be
101    expressed in decimal (base 10) or binary (base 2) terms, as specified
102    in the column numeric_precision_radix. For all other data types, this
103    column is null.
104
105    numeric_precision_radix cardinal_number
106
107    If data_type identifies a numeric type, this column indicates in which
108    base the values in the columns numeric_precision and numeric_scale are
109    expressed. The value is either 2 or 10. For all other data types, this
110    column is null.
111
112    numeric_scale cardinal_number
113
114    If data_type identifies an exact numeric type, this column contains the
115    (declared or implicit) scale of the type for this attribute. The scale
116    indicates the number of significant digits to the right of the decimal
117    point. It can be expressed in decimal (base 10) or binary (base 2)
118    terms, as specified in the column numeric_precision_radix. For all
119    other data types, this column is null.
120
121    datetime_precision cardinal_number
122
123    If data_type identifies a date, time, timestamp, or interval type, this
124    column contains the (declared or implicit) fractional seconds precision
125    of the type for this attribute, that is, the number of decimal digits
126    maintained following the decimal point in the seconds value. For all
127    other data types, this column is null.
128
129    interval_type character_data
130
131    If data_type identifies an interval type, this column contains the
132    specification which fields the intervals include for this attribute,
133    e.g., YEAR TO MONTH, DAY TO SECOND, etc. If no field restrictions were
134    specified (that is, the interval accepts all fields), and for all other
135    data types, this field is null.
136
137    interval_precision cardinal_number
138
139    Applies to a feature not available in PostgreSQL (see
140    datetime_precision for the fractional seconds precision of interval
141    type attributes)
142
143    attribute_udt_catalog sql_identifier
144
145    Name of the database that the attribute data type is defined in (always
146    the current database)
147
148    attribute_udt_schema sql_identifier
149
150    Name of the schema that the attribute data type is defined in
151
152    attribute_udt_name sql_identifier
153
154    Name of the attribute data type
155
156    scope_catalog sql_identifier
157
158    Applies to a feature not available in PostgreSQL
159
160    scope_schema sql_identifier
161
162    Applies to a feature not available in PostgreSQL
163
164    scope_name sql_identifier
165
166    Applies to a feature not available in PostgreSQL
167
168    maximum_cardinality cardinal_number
169
170    Always null, because arrays always have unlimited maximum cardinality
171    in PostgreSQL
172
173    dtd_identifier sql_identifier
174
175    An identifier of the data type descriptor of the attribute, unique
176    among the data type descriptors pertaining to the composite type. This
177    is mainly useful for joining with other instances of such identifiers.
178    (The specific format of the identifier is not defined and not
179    guaranteed to remain the same in future versions.)
180
181    is_derived_reference_attribute yes_or_no
182
183    Applies to a feature not available in PostgreSQL
184
185    See also under Section 35.17, a similarly structured view, for further
186    information on some of the columns.