1DROP TYPE(7)            PostgreSQL 9.2.24 Documentation           DROP TYPE(7)
2
3
4

NAME

6       DROP_TYPE - remove a data type
7

SYNOPSIS

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

DESCRIPTION

12       DROP TYPE removes a user-defined data type. Only the owner of a type
13       can remove it.
14

PARAMETERS

16       IF EXISTS
17           Do not throw an error if the type does not exist. A notice is
18           issued in this case.
19
20       name
21           The name (optionally schema-qualified) of the data type to remove.
22
23       CASCADE
24           Automatically drop objects that depend on the type (such as table
25           columns, functions, operators).
26
27       RESTRICT
28           Refuse to drop the type if any objects depend on it. This is the
29           default.
30

EXAMPLES

32       To remove the data type box:
33
34           DROP TYPE box;
35

COMPATIBILITY

37       This command is similar to the corresponding command in the SQL
38       standard, apart from the IF EXISTS option, which is a PostgreSQL
39       extension. But note that much of the CREATE TYPE command and the data
40       type extension mechanisms in PostgreSQL differ from the SQL standard.
41

SEE ALSO

43       ALTER TYPE (ALTER_TYPE(7)), CREATE TYPE (CREATE_TYPE(7))
44
45
46
47PostgreSQL 9.2.24                 2017-11-06                      DROP TYPE(7)
Impressum