35.59. user_defined_types

The view user_defined_types currently contains all composite types defined in the current database. Only those types are shown that the current user has access to (by way of being the owner or having some privilege).

SQL knows about two kinds of user-defined types: structured types (also known as composite types in Postgres Pro) and distinct types (not implemented in Postgres Pro). To be future-proof, use the column user_defined_type_category to differentiate between these. Other user-defined types such as base types and enums, which are Postgres Pro extensions, are not shown here. For domains, see Section 35.23 instead.

Table 35.57. user_defined_types Columns

NameData TypeDescription
user_defined_type_catalogsql_identifierName of the database that contains the type (always the current database)
user_defined_type_schemasql_identifierName of the schema that contains the type
user_defined_type_namesql_identifierName of the type
user_defined_type_categorycharacter_data Currently always STRUCTURED
is_instantiableyes_or_noApplies to a feature not available in Postgres Pro
is_finalyes_or_noApplies to a feature not available in Postgres Pro
ordering_formcharacter_dataApplies to a feature not available in Postgres Pro
ordering_categorycharacter_dataApplies to a feature not available in Postgres Pro
ordering_routine_catalogsql_identifierApplies to a feature not available in Postgres Pro
ordering_routine_schemasql_identifierApplies to a feature not available in Postgres Pro
ordering_routine_namesql_identifierApplies to a feature not available in Postgres Pro
reference_typecharacter_dataApplies to a feature not available in Postgres Pro
data_typecharacter_dataApplies to a feature not available in Postgres Pro
character_maximum_lengthcardinal_numberApplies to a feature not available in Postgres Pro
character_octet_lengthcardinal_numberApplies to a feature not available in Postgres Pro
character_set_catalogsql_identifierApplies to a feature not available in Postgres Pro
character_set_schemasql_identifierApplies to a feature not available in Postgres Pro
character_set_namesql_identifierApplies to a feature not available in Postgres Pro
collation_catalogsql_identifierApplies to a feature not available in Postgres Pro
collation_schemasql_identifierApplies to a feature not available in Postgres Pro
collation_namesql_identifierApplies to a feature not available in Postgres Pro
numeric_precisioncardinal_numberApplies to a feature not available in Postgres Pro
numeric_precision_radixcardinal_numberApplies to a feature not available in Postgres Pro
numeric_scalecardinal_numberApplies to a feature not available in Postgres Pro
datetime_precisioncardinal_numberApplies to a feature not available in Postgres Pro
interval_typecharacter_dataApplies to a feature not available in Postgres Pro
interval_precisioncardinal_numberApplies to a feature not available in Postgres Pro
source_dtd_identifiersql_identifierApplies to a feature not available in Postgres Pro
ref_dtd_identifiersql_identifierApplies to a feature not available in Postgres Pro