DROP TYPE deletes a user-defined data type. Only the type owner has permission to run this statement.
1 | DROP TYPE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] |
Sends a notice instead of an error if the specified type does not exist.
Specifies the name of the type to be deleted (schema-qualified).
Deletes objects (such as columns, functions, and operators) that depend on the type.
RESTRICT
Refuses to delete the type if any objects depend on it. This is the default.
Delete the compfoo type.
1 | DROP TYPE compfoo cascade; |