DROP TYPE

Delete the data type.

Summary

DROP TYPE [IF EXISTS] name [, ...] [CASCADE | RESTRICT]

describe

DROP TYPE will delete the user-defined data type. Only the owner of the type can delete it.

Parameters

IF EXISTS

  • If this type does not exist, please do not report an error. In this case, a notification will be issued.

name

  • The name of the data type to be deleted (can be specified by the schema).

CASCADE

  • Automatically delete objects that depend on types (such as table columns, functions, operators).

RESTRICT

  • If any object depends on the type, the type is denied. This is the default value.

Example

Delete data type box:

DROP TYPE box;

compatibility

This command is similar to the corresponding commands in the SQL standard, except for the IF EXISTS option (which is the YMatrix database extension). But please note that many of the CREATE TYPE commands and data type extension mechanisms in the YMatrix database are different from those of the SQL standard.

See also

ALTER TYPE , CREATE TYPE