pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marcelo Costa <marcelojscosta@gmail.com>
To: Marcelo Costa <marcelojscosta@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Drop All Index
Date: Mon, 27 Nov 2006 13:36:41 -0300
Message-ID: <c13f2d590611270836mc6c20coc7bb7bc203d9e7c6@mail.gmail.com> (raw)
In-Reply-To: <20061127142722.GC4432@alvh.no-ip.org>
References: <c13f2d590611260752m29a30734p2e30c42558fd068@mail.gmail.com>
	<20061127142722.GC4432@alvh.no-ip.org>

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

[],s

Marcelo.

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



-- 
Marcelo Costa

view thread (5+ messages)

Message-ID: <c13f2d590611270836mc6c20coc7bb7bc203d9e7c6@mail.gmail.com>
Permalink:  ../c13f2d590611270836mc6c20coc7bb7bc203d9e7c6@mail.gmail.com/
Also on:    postgresql.org/message-id/c13f2d590611270836mc6c20coc7bb7bc203d9e7c6@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: marcelojscosta@gmail.com
  Subject: Re: Drop All Index
  In-Reply-To: <c13f2d590611270836mc6c20coc7bb7bc203d9e7c6@mail.gmail.com>
  References: <c13f2d590611260752m29a30734p2e30c42558fd068@mail.gmail.com> <20061127142722.GC4432@alvh.no-ip.org> <c13f2d590611270836mc6c20coc7bb7bc203d9e7c6@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox