Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 68F309FB1F8 for ; Mon, 27 Nov 2006 10:27:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 97634-08 for ; Mon, 27 Nov 2006 10:27:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 087C09FA2CA for ; Mon, 27 Nov 2006 10:27:32 -0400 (AST) Received: from alvh.no-ip.org (200-126-100-202.bk7-dsl.surnet.cl [200.126.100.202]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id kAREROdL012192; Mon, 27 Nov 2006 06:27:25 -0800 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 2467CC2D33D; Mon, 27 Nov 2006 11:27:22 -0300 (CLST) Date: Mon, 27 Nov 2006 11:27:22 -0300 From: Alvaro Herrera To: Marcelo Costa Cc: pgsql-admin@postgresql.org Subject: Re: Drop All Index Message-ID: <20061127142722.GC4432@alvh.no-ip.org> Mail-Followup-To: Marcelo Costa , pgsql-admin@postgresql.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Mon, 27 Nov 2006 06:27:26 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/219 X-Sequence-Number: 23746 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