psql -d appdb -c "DROP INDEX idx_users_email;"

Category: Databases & SQL

psql -d appdb -c "DROP INDEX idx_users_email;"

Remove an index

Removes the index and frees its space; queries fall back to other indexes or sequential scans. Dropping a unique index also lifts the uniqueness guarantee. Keep a migration record so it can be recreated.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.