> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/client-interfaces/information-schema/infoschema-user-defined-types.md).

# 35.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 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 35.23](/client-interfaces/information-schema/infoschema-domains.md) instead.

**Table 35.58. `user_defined_types` Columns**

| <p>Column Type</p><p>Description</p>                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>user\_defined\_type\_catalog</code> <code>sql\_identifier</code></p><p>Name of the database that contains the type (always the current database)</p> |
| <p><code>user\_defined\_type\_schema</code> <code>sql\_identifier</code></p><p>Name of the schema that contains the type</p>                                  |
| <p><code>user\_defined\_type\_name</code> <code>sql\_identifier</code></p><p>Name of the type</p>                                                             |
| <p><code>user\_defined\_type\_category</code> <code>character\_data</code></p><p>Currently always <code>STRUCTURED</code></p>                                 |
| <p><code>is\_instantiable</code> <code>yes\_or\_no</code></p><p>Applies to a feature not available in PostgreSQL</p>                                          |
| <p><code>is\_final</code> <code>yes\_or\_no</code></p><p>Applies to a feature not available in PostgreSQL</p>                                                 |
| <p><code>ordering\_form</code> <code>character\_data</code></p><p>Applies to a feature not available in PostgreSQL</p>                                        |
| <p><code>ordering\_category</code> <code>character\_data</code></p><p>Applies to a feature not available in PostgreSQL</p>                                    |
| <p><code>ordering\_routine\_catalog</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                            |
| <p><code>ordering\_routine\_schema</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                             |
| <p><code>ordering\_routine\_name</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                               |
| <p><code>reference\_type</code> <code>character\_data</code></p><p>Applies to a feature not available in PostgreSQL</p>                                       |
| <p><code>data\_type</code> <code>character\_data</code></p><p>Applies to a feature not available in PostgreSQL</p>                                            |
| <p><code>character\_maximum\_length</code> <code>cardinal\_number</code></p><p>Applies to a feature not available in PostgreSQL</p>                           |
| <p><code>character\_octet\_length</code> <code>cardinal\_number</code></p><p>Applies to a feature not available in PostgreSQL</p>                             |
| <p><code>character\_set\_catalog</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                               |
| <p><code>character\_set\_schema</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                                |
| <p><code>character\_set\_name</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                                  |
| <p><code>collation\_catalog</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                                    |
| <p><code>collation\_schema</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                                     |
| <p><code>collation\_name</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                                       |
| <p><code>numeric\_precision</code> <code>cardinal\_number</code></p><p>Applies to a feature not available in PostgreSQL</p>                                   |
| <p><code>numeric\_precision\_radix</code> <code>cardinal\_number</code></p><p>Applies to a feature not available in PostgreSQL</p>                            |
| <p><code>numeric\_scale</code> <code>cardinal\_number</code></p><p>Applies to a feature not available in PostgreSQL</p>                                       |
| <p><code>datetime\_precision</code> <code>cardinal\_number</code></p><p>Applies to a feature not available in PostgreSQL</p>                                  |
| <p><code>interval\_type</code> <code>character\_data</code></p><p>Applies to a feature not available in PostgreSQL</p>                                        |
| <p><code>interval\_precision</code> <code>cardinal\_number</code></p><p>Applies to a feature not available in PostgreSQL</p>                                  |
| <p><code>source\_dtd\_identifier</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                               |
| <p><code>ref\_dtd\_identifier</code> <code>sql\_identifier</code></p><p>Applies to a feature not available in PostgreSQL</p>                                  |

<br>

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/infoschema-user-defined-types.html)（英文原文，待翻譯）


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.postgresql.tw/client-interfaces/information-schema/infoschema-user-defined-types.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
