Re: Drop All Index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Alvaro, thanks, I make a function to do this.

[],s

Marcelo.

2006/11/27, Alvaro Herrera <alvherre@xxxxxxxxxxxxxxxxx>:
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



--
Marcelo Costa

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux