1DROP INDEX(7)            PostgreSQL 11.6 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, and in turn
39           all objects that depend on those objects (see Section 5.13).
40
41       RESTRICT
42           Refuse to drop the index if any objects depend on it. This is the
43           default.
44

EXAMPLES

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

COMPATIBILITY

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

SEE ALSO

55       CREATE INDEX (CREATE_INDEX(7))
56
57
58
59PostgreSQL 11.6                      2019                        DROP INDEX(7)
Impressum