Re: Drop All Index

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: Drop All Index
Дата
Msg-id
20061127142722.GC4432@alvh.no-ip.org
Ответ на
Drop All Index (Marcelo Costa)
Список
Дерево обсуждения
Drop All Index "Marcelo Costa" <marcelojscosta@gmail.com>
Re: Drop All Index Alvaro Herrera <alvherre@commandprompt.com>
Re: Drop All Index "Peter Childs" <peterachilds@gmail.com>
Re: Drop All Index Alvaro Herrera <alvherre@commandprompt.com>
Re: Drop All Index "Marcelo Costa" <marcelojscosta@gmail.com>
Marcelo Costa wrote:
> Hi to all,
> 
> Anybody can help me how to proced to delete all index from my database,
> exists any command to this ?

Sure, you can create a PL/pgSQL function that loops around a "select
relname from pg_class where relkind='i' AND ..." and then issues DROP
INDEX for each (or you can do it in shell).  Be careful to include a
clause to select only indexes that are not in system catalogs!

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-admin по дате отправления
От: imad
Дата:
Сообщение: Re: postgres and solaris
От: Peter Childs
Дата:
Сообщение: Re: Drop All Index
FAQ