

An enum open from the Types section
Engine support
A table’s own row type, the array type created beside every type, the multirange created beside every range, and any type an extension installed are left out. A type in another schema is listed under that schema. On SQL Server the built-in types are left out too, so the section holds only what the database declares.
Reading a definition
On an engine that edits types, the statement is under Definition in the tab; elsewhere it is the whole tab. It is rebuilt from the catalog rather than read back as typed: comments inside the original statement are gone, names are quoted, and a domain’s constraints appear in name order. A domain check added without validating the stored values follows theCREATE DOMAIN as its own ALTER DOMAIN … NOT VALID, because CREATE DOMAIN has no NOT VALID. The view carries the same toolbar as a routine’s source, Copy, Export…, Open in Editor and Reload, and beside the statement sit the properties the catalog reports: a domain’s base type, a range’s subtype, the owner, and the comment.
Hover a row in the sidebar for the same facts without opening it: an enum’s labels, a composite’s fields, a domain’s base type.
On SQL Server nothing is stored to read back at all, because a type has no sys.sql_modules row. A table type’s statement is rebuilt from its columns and indexes, keeping identity, defaults, computed columns, inline indexes and any collation that differs from the database’s; an alias type’s is rebuilt from its base type and nullability. A CLR type names the assembly it came from, since its body is compiled .NET rather than T-SQL.
A SQL Server table type is a table-valued parameter and cannot declare a column, so it is left out of the column type picker. Alias types appear there.
On Cassandra the statement is rebuilt from system_schema.types: the fields in declaration order, each with the type the server reports.
Creating a type
Right-click Types and choose New Type…. Pick Enum Type, Composite Type or Domain, name it, and fill in its labels, its fields, or its base type with an optional default, Not Null and checks. The statement Create runs is shown at the bottom of the sheet, and the new type opens in a tab once it exists. The type goes in the schema whose Types section you right-clicked.Editing a type
Nothing here reaches the server on its own. Type changes queue on the tab, Preview SQL (Cmd+Shift+P) shows the statements they will produce, and Cmd+S runs them.
General holds the name and the comment, and for a domain its default and Not Null. Beside it, Labels, Fields or Constraints lists the type’s members as they will be once the queue runs, and the Change column marks each one New, Was ”…”, Dropped or Validated on save.
An enum label cannot be removed or moved once it exists. To drop or reorder one, create a new type with the labels in the order you want, and convert the columns that use the old type.
The queue under the tab lists the changes in the order they run; the cross beside one takes it out. A rename always runs last. A change that no longer fits, such as a label placed after one whose addition you took out, says why in red, and Save Changes refuses until you fix or remove it.
Saving changes
Save Changes asks at most once, on a sheet showing the statements, as the connection’s Safe Mode level requires. A save that drops a field or a constraint, or changes a field’s type, asks even at Silent. The save runs on a connection of its own, in one transaction, so a change the server refuses saves nothing. A save that adds an enum label runs each statement on its own instead, because PostgreSQL before 12 refusesALTER TYPE … ADD VALUE inside a transaction block. Then the changes before the refused one are saved and leave the queue.
The server’s message appears under the change it refused, and the rest stay queued. A check the stored values break reports column "…" of table "…" contains values that violate the new constraint: fix those rows, or add the check with Check the values already stored turned off and Validate it later.
A composite that a table column uses cannot change a field’s type. PostgreSQL answers cannot alter type "…" because column "…" uses it.
Once a save runs, the Types section, the column type picker and every table tab on that database read the type again, in every window.
Renaming and dropping a type
Right-click a type in the sidebar. Rename edits the name in place. Drop Type… asks first; on PostgreSQL, select Cascade to drop the columns, functions and other objects that use the type along with it. Without Cascade, and always on SQL Server, Cassandra and ScyllaDB, the server refuses while a table or another type still uses the type, and its reason is shown. The Types section refreshes once the drop runs, and a tab open on the dropped type closes. A read-only connection has no New Type…, Rename or Drop Type….Using a type in a column
In a table’s Structure tab, the column type picker opens with a User-Defined group listing the types of every schema the sidebar’s schema filter keeps, and of the table’s own schema, ahead of the engine’s. Every entry is schema-qualified and quoted where the name needs it,sales.status or app."Order Status", so the column definition names the type and never a built-in of the same name. See Table Structure.
On Cassandra and ScyllaDB the group lists the types of the table’s own keyspace, the only one a column can use, by name, quoted where the name needs it. An entry comes wrapped as frozen<address> where a plain column cannot hold the type: when a field is a collection that is not frozen, on Cassandra before 3.6, and on ScyllaDB.
Finding a type
The sidebar filter matches a type by name. File > Open Quickly… (Cmd+Shift+O) indexes types alongside tables, routines and triggers, and choosing one opens its definition.

