36.60. 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 36.23 instead.

Table 36.58. user_defined_types Columns

Column Type

Description

user_defined_type_catalogsql_identifier

Name of the database that contains the type (always the current database)

user_defined_type_schemasql_identifier

Name of the schema that contains the type

user_defined_type_namesql_identifier

Name of the type

user_defined_type_categorycharacter_data

Currently always STRUCTURED

is_instantiableyes_or_no

Applies to a feature not available in Postgres Pro

is_finalyes_or_no

Applies to a feature not available in Postgres Pro

ordering_formcharacter_data

Applies to a feature not available in Postgres Pro

ordering_categorycharacter_data

Applies to a feature not available in Postgres Pro

ordering_routine_catalogsql_identifier

Applies to a feature not available in Postgres Pro

ordering_routine_schemasql_identifier

Applies to a feature not available in Postgres Pro

ordering_routine_namesql_identifier

Applies to a feature not available in Postgres Pro

reference_typecharacter_data

Applies to a feature not available in Postgres Pro

data_typecharacter_data

Applies to a feature not available in Postgres Pro

character_maximum_lengthcardinal_number

Applies to a feature not available in Postgres Pro

character_octet_lengthcardinal_number

Applies to a feature not available in Postgres Pro

character_set_catalogsql_identifier

Applies to a feature not available in Postgres Pro

character_set_schemasql_identifier

Applies to a feature not available in Postgres Pro

character_set_namesql_identifier

Applies to a feature not available in Postgres Pro

collation_catalogsql_identifier

Applies to a feature not available in Postgres Pro

collation_schemasql_identifier

Applies to a feature not available in Postgres Pro

collation_namesql_identifier

Applies to a feature not available in Postgres Pro

numeric_precisioncardinal_number

Applies to a feature not available in Postgres Pro

numeric_precision_radixcardinal_number

Applies to a feature not available in Postgres Pro

numeric_scalecardinal_number

Applies to a feature not available in Postgres Pro

datetime_precisioncardinal_number

Applies to a feature not available in Postgres Pro

interval_typecharacter_data

Applies to a feature not available in Postgres Pro

interval_precisioncardinal_number

Applies to a feature not available in Postgres Pro

source_dtd_identifiersql_identifier

Applies to a feature not available in Postgres Pro

ref_dtd_identifiersql_identifier

Applies to a feature not available in Postgres Pro


close