On Tue, 9 Nov 2004 17:30:25 +0200 (EET), Achilleus Mantzios <[EMAIL PROTECTED]> wrote:
>O Giulio Orsero έγραψε στις Nov 9, 2004 : >> I need a way to drop all indexes of a table without knowing the names of the >> indexes. >% foreach i ( `psql -t -q -c "SELECT ci.relname from pg_index i,pg_class >ci,pg_class ct where i.indexrelid=ci.oid and i.indrelid=ct.oid and >ct.relname='YOUR_TABLE_HERE'"` ) >foreach? psql -c "drop index $i" >foreach? end Ok, worked as expected. thanks -- [EMAIL PROTECTED] ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend