1DROP TYPE(7) SQL Commands DROP TYPE(7)
2
3
4
6 DROP TYPE - remove a data type
7
8
10 DROP TYPE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
11
12
14 DROP TYPE removes a user-defined data type. Only the owner of a type
15 can remove it.
16
18 IF EXISTS
19 Do not throw an error if the type does not exist. A notice is
20 issued in this case.
21
22 name The name (optionally schema-qualified) of the data type to
23 remove.
24
25 CASCADE
26 Automatically drop objects that depend on the type (such as ta‐
27 ble columns, functions, operators).
28
29 RESTRICT
30 Refuse to drop the type if any objects depend on it. This is the
31 default.
32
34 To remove the data type box:
35
36 DROP TYPE box;
37
38
40 This command is similar to the corresponding command in the SQL stan‐
41 dard, apart from the IF EXISTS option, which is a PostgreSQL extension.
42 But note that the CREATE TYPE command and the data type extension mech‐
43 anisms in PostgreSQL differ from the SQL standard.
44
46 CREATE TYPE [create_type(7)], ALTER TYPE [alter_type(7)]
47
48
49
50SQL - Language Statements 2014-02-17 DROP TYPE(7)