Redrock Postgres Search Chinese
Version: 9.3 / 9.4 / 9.5 / 9.6 / 10 / 11 / 12 / 13 / 14 / 15 / 16 / 17

36.58. 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 PostgreSQL) and distinct types (not implemented in PostgreSQL). 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 PostgreSQL extensions, are not shown here. For domains, see Section 36.22 instead.

Table 36.56. 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 PostgreSQL
is_finalyes_or_noApplies to a feature not available in PostgreSQL
ordering_formcharacter_dataApplies to a feature not available in PostgreSQL
ordering_categorycharacter_dataApplies to a feature not available in PostgreSQL
ordering_routine_catalogsql_identifierApplies to a feature not available in PostgreSQL
ordering_routine_schemasql_identifierApplies to a feature not available in PostgreSQL
ordering_routine_namesql_identifierApplies to a feature not available in PostgreSQL
reference_typecharacter_dataApplies to a feature not available in PostgreSQL
data_typecharacter_dataApplies to a feature not available in PostgreSQL
character_maximum_lengthcardinal_numberApplies to a feature not available in PostgreSQL
character_octet_lengthcardinal_numberApplies to a feature not available in PostgreSQL
character_set_catalogsql_identifierApplies to a feature not available in PostgreSQL
character_set_schemasql_identifierApplies to a feature not available in PostgreSQL
character_set_namesql_identifierApplies to a feature not available in PostgreSQL
collation_catalogsql_identifierApplies to a feature not available in PostgreSQL
collation_schemasql_identifierApplies to a feature not available in PostgreSQL
collation_namesql_identifierApplies to a feature not available in PostgreSQL
numeric_precisioncardinal_numberApplies to a feature not available in PostgreSQL
numeric_precision_radixcardinal_numberApplies to a feature not available in PostgreSQL
numeric_scalecardinal_numberApplies to a feature not available in PostgreSQL
datetime_precisioncardinal_numberApplies to a feature not available in PostgreSQL
interval_typecharacter_dataApplies to a feature not available in PostgreSQL
interval_precisioncardinal_numberApplies to a feature not available in PostgreSQL
source_dtd_identifiersql_identifierApplies to a feature not available in PostgreSQL
ref_dtd_identifiersql_identifierApplies to a feature not available in PostgreSQL