Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id D3BA247665F for ; Tue, 7 May 2002 10:07:10 -0400 (EDT) Received: from pns.mm.eutelsat.org (pns.mm.eutelsat.org [194.214.173.227]) by postgresql.org (Postfix) with ESMTP id 74FDA475E40 for ; Tue, 7 May 2002 09:11:56 -0400 (EDT) Received: from nts-03.mm.eutelsat.org (localhost [127.0.0.1]) by pns.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id g47DBTZ21099; Tue, 7 May 2002 15:11:29 +0200 Received: from dell-01.mm.eutelsat.org (IDENT:root@dell-01.mm.eutelsat.org [194.214.173.17]) by nts-03.mm.eutelsat.org (8.9.3/8.8.7) with ESMTP id OAA24109; Tue, 7 May 2002 14:05:31 +0200 Received: from GMENDOLA2 (gmendola2.mm.eutelsat.org [194.214.173.26]) by dell-01.mm.eutelsat.org (8.11.2/8.8.7) with SMTP id g47DBTL05697; Tue, 7 May 2002 15:11:29 +0200 Message-ID: <012f01c1f5c8$bad48a00$d5a9fea9@GMENDOLA2> From: "Gaetano Mendola" To: "Rajesh Kumar Mallah." , References: <009501c1f598$bb3fa8b0$d5a9fea9@GMENDOLA2> <011001c1f5b0$76ed58c0$d5a9fea9@GMENDOLA2> <200205071602.41096.mallah@trade-india.com> Subject: Re: Delete function Date: Tue, 7 May 2002 15:11:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200205/51 X-Sequence-Number: 4226 "Rajesh Kumar Mallah." wrote: > eg > regression=> \o command.sql > regression=> select 'DROP function ' || proname from pg_proc WHERE proname > ~ '^sp_'; > > then psql -f command.sql This work fine with the views, unfortunately when you drop a function you should specify the argument type, so I did in this way (I think is the clean way): $ psql -t -c "SELECT 'DROP function ' || proname || ' ('|| oidvectortypes(proargtypes) || ');' from pg_proc WHERE proname ~ '^sp_'" > todelete.sql $ psql -f todelete.sql Ciao Gaetano