The attributes view provides information about the attributes of composite data types defined in the database.
| Column name | Data type | Description |
|---|---|---|
udt_catalog |
sql_identifier |
The name of the current database containing the data type. |
udt_schema |
sql_identifier |
The name of the schema containing the data type. |
udt_name |
sql_identifier |
The name of the data type. |
attribute_name |
sql_identifier |
The name of the attribute. |
ordinal_position |
cardinal_number |
The ordinal position of the attribute within the data type. The count starts at 1. |
attribute_default |
character_data |
The default expression of the attribute. |
is_nullable |
yes_or_no |
Specifies whether the attribute is possibly nullable (YES) or not (NO). |
data_type |
character_data |
The attribute’s data type if it is one of the built-in types. Otherwise, a general category name. The possible values are:
|
character_maximum_length |
cardinal_number |
The declared maximum length if data_type identifies a character or bit string type. NULL – All other types or if no maximum length was declared. |
character_octet_length |
cardinal_number |
The maximum possible length, in octets (bytes), if data_type identifies a character type. NULL – All other types. |
character_set_catalog |
sql_identifier |
Applies to a feature that is not available in PostgreSQL. |
character_set_schema |
sql_identifier |
Applies to a feature that is not available in PostgreSQL. |
character_set_name |
sql_identifier |
Applies to a feature that is not available in PostgreSQL. |
collation_catalog |
sql_identifier |
The name of the current database containing the collation of the attribute (always the current database), or NULL if default or if the attribute’s data type is not collatable. |
collation_schema |
sql_identifier |
The name of the schema containing the attribute’s collation.NULL – Default or not collatable. |
collation_name |
sql_identifier |
The name of the attribute’s collation.NULL – Default or not collatable. |
numeric_precision |
cardinal_number |
The declared or implicit precision of a numeric attribute.NULL – All other data types. |
numeric_precision_radix |
cardinal_number |
The base (2 or 10) in which numeric precision and scale are expressed.NULL – Non-numeric data types. |
numeric_scale |
cardinal_number |
The declared or implicit scale of an exact numeric attribute.NULL – All other data types. |
datetime_precision |
cardinal_number |
The fractional seconds precision of a date/time/timestamp/interval attribute.NULL – All other data types. |
interval_type |
character_data |
The interval field specification. For example, YEAR TO MONTH.NULL – An unrestricted or non-interval type. |
interval_precision |
cardinal_number |
Applies to a feature that is not available in PostgreSQL. |
attribute_udt_catalog |
sql_identifier |
The name of the current database in which the attribute’s data type is defined. |
attribute_udt_schema |
sql_identifier |
The name of the schema in which the attribute’s data type is defined. |
attribute_udt_name |
sql_identifier |
The name of the attribute’s data type. |
scope_catalog |
sql_identifier |
Applies to a feature that is not available in PostgreSQL. |
scope_schema |
sql_identifier |
Applies to a feature that is not available in PostgreSQL. |
scope_name |
sql_identifier |
Applies to a feature that is not available in PostgreSQL. |
maximum_cardinality |
cardinal_number |
The maximum cardinality of the array. Always NULL, because arrays in PostgreSQL have unlimited maximum cardinality. |
dtd_identifier |
sql_identifier |
An identifier for the attribute’s data-type descriptor, guaranteed to be unique within the composite type. |
is_derived_reference_attribute |
yes_or_no |
Applies to a feature that is not available in PostgreSQL. |