1DROP TYPE()                      SQL Commands                      DROP TYPE()
2
3
4

NAME

6       DROP TYPE - remove a data type
7
8

SYNOPSIS

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

DESCRIPTION

14       DROP  TYPE  will  remove a user-defined data type.  Only the owner of a
15       type can remove it.
16

PARAMETERS

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

EXAMPLES

34       To remove the data type box:
35
36       DROP TYPE box;
37
38

COMPATIBILITY

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

SEE ALSO

46       CREATE TYPE [create_type(7)], ALTER TYPE [alter_type(l)]
47
48
49
50SQL - Language Statements         2008-06-08                       DROP TYPE()
Impressum