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

NAME

6       DROP_INDEX - remove an index
7

SYNOPSIS

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

DESCRIPTION

12       DROP INDEX drops an existing index from the database system. To execute
13       this command you must be the owner of the index.
14

PARAMETERS

16       CONCURRENTLY
17           Drop the index without locking out concurrent selects, inserts,
18           updates, and deletes on the index's table. A normal DROP INDEX
19           acquires exclusive lock on the table, blocking other accesses until
20           the index drop can be completed. With this option, the command
21           instead waits until conflicting transactions have completed.
22
23           There are several caveats to be aware of when using this option.
24           Only one index name can be specified, and the CASCADE option is not
25           supported. (Thus, an index that supports a UNIQUE or PRIMARY KEY
26           constraint cannot be dropped this way.) Also, regular DROP INDEX
27           commands can be performed within a transaction block, but DROP
28           INDEX CONCURRENTLY cannot.
29
30       IF EXISTS
31           Do not throw an error if the index does not exist. A notice is
32           issued in this case.
33
34       name
35           The name (optionally schema-qualified) of an index to remove.
36
37       CASCADE
38           Automatically drop objects that depend on the index.
39
40       RESTRICT
41           Refuse to drop the index if any objects depend on it. This is the
42           default.
43

EXAMPLES

45       This command will remove the index title_idx:
46
47           DROP INDEX title_idx;
48

COMPATIBILITY

50       DROP INDEX is a PostgreSQL language extension. There are no provisions
51       for indexes in the SQL standard.
52

SEE ALSO

54       CREATE INDEX (CREATE_INDEX(7))
55
56
57
58PostgreSQL 9.2.24                 2017-11-06                     DROP INDEX(7)
Impressum