Name
DROP INDEX -- Removes an index from a database.
Synopsis
DROP INDEX index_name [, ...]
Parameters
- index_name
The name of the index you wish to remove from the database.
Results
- DROP
The message returned if the index is removed successfully.
- ERROR: index "index_name" does not exist
The error returned if the specified index cannot be found within the database.
Description
The owner of an index may remove it from the database by using this command.
Example
The following example drops an index called customer_id_idx from the booktown database:
booktown=# DROP INDEX customer_id_idx;
DROP
The next example drops two indices simultaneously from the booktown database:
booktown=# DROP INDEX books_id_pkey, books_title_idx;
DROP