I know how to find index by name in MS SQL Server just by search for %name%

But where I can do the same in PGAdmin4 ?

  • 1
    select * from pg_indexes where indexname like '%name%'? – a_horse_with_no_name Jan 17 at 14:54
  • in MS SQL Management Studio I can search for them and easily delete by pressing DELETE button on the keyboard. How I can delete them (indexes by %name% ) in PostgreSQL ? – Michał Lipok Jan 17 at 15:10
  • No idea. I don't use pgAdmin. – a_horse_with_no_name Jan 17 at 15:12
  • pgadmn has none option for this use the sql comands – nbk Jan 17 at 22:30

As a horse_with_no_name provided, you can search the pg_indexes meta-table to find an index by name with the query:

FROM pg_indexes 
WHERE indexname LIKE '%NameOfIndexYoureSearchingFor%';

Regarding your second question in the comments on how to delete an index in PostgreSQL, you can script it out with a query like this:

DROP INDEX NameOfIndexYouWantToDrop;

PostgreSQL documentation on DROP INDEX for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.