X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4A3333A3CD7 for ; Tue, 9 Nov 2004 14:41:02 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38311-07 for ; Tue, 9 Nov 2004 14:40:52 +0000 (GMT) Received: from wnx-5a.seeweb.it (wnx-5a.seeweb.it [212.25.170.113]) by svr1.postgresql.org (Postfix) with ESMTP id CA2AD3A2BE5 for ; Tue, 9 Nov 2004 14:40:48 +0000 (GMT) Received: from mail.golden.dom ([213.255.43.90]) (authenticated bits=0) by wnx-5a.seeweb.it (8.12.3/8.12.3/Debian-6.6) with ESMTP id iA9Eekbd028984 for ; Tue, 9 Nov 2004 15:40:48 +0100 From: Giulio Orsero To: pgsql-sql@postgresql.org Subject: Drop all indexes of a table w/o knowing the index names Date: Tue, 09 Nov 2004 15:40:39 +0100 Organization: nowhere X-Mailer: Forte Agent 2.0/32.652 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20041109144039.1B2D313346@mail.golden.dom> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/80 X-Sequence-Number: 19399 7.4.6 on Linux. I need a way to drop all indexes of a table without knowing the names of the indexes. Say I have a table table1 index1 index2 index3 I don't want to do drop index1; drop index2; drop index3; but I want drop is this possible? I looked in the manual at pg_index, but couldn't build an sql string to do it. Thanks -- giulioo@pobox.com