DROP INDEX
Function
DROP INDEX deletes an index.
Precautions
Only the owner of an index or a system administrator can run DROP INDEX command.
Syntax
1 2 | DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ]
index_name [, ...] [ CASCADE | RESTRICT ];
|
Parameter Description
- CONCURRENTLY
Deletes an index without locking it. In general, during the deletion, the access of other statements to the tables that the index depends on is blocked. This keyword allows the access of other statements in this case.
This option only specifies one index name, and CASCADE cannot be used in this case.
The DROP INDEX command can be run within a transaction, but DROP INDEX CONCURRENTLY cannot be run in a transaction.
- IF EXISTS
Sends a notice instead of an error if the specified index does not exist.
- index_name
Specifies the name of the index to be deleted.
Value range: An existing index.
- CASCADE | RESTRICT
- CASCADE: automatically deletes all objects that depend on the index to be deleted.
- RESTRICT (default): refuses to delete the index if any objects depend on it.
Examples
See Examples in CREATE INDEX.
Helpful Links
Last Article: DROP GROUP
Next Article: DROP NODE
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.