Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 45E0C476758 for ; Tue, 7 May 2002 10:07:28 -0400 (EDT) Received: from mail-relay.trade-india.com (unknown [203.196.129.235]) by postgresql.org (Postfix) with SMTP id B8345475F78 for ; Tue, 7 May 2002 09:16:39 -0400 (EDT) Received: (qmail 9956 invoked from network); 7 May 2002 13:10:01 -0000 Received: from system29.trade-india-local.com (HELO server) (192.168.0.29) by ptil-236-129-del.primus-india.net with SMTP; 7 May 2002 13:10:01 -0000 Content-Type: text/plain; charset="iso-8859-1" From: "Rajesh Kumar Mallah." Organization: Infocom Network Limited. To: "Gaetano Mendola" , Subject: Re: Delete function Date: Tue, 7 May 2002 18:46:00 +0530 X-Mailer: KMail [version 1.4] References: <009501c1f598$bb3fa8b0$d5a9fea9@GMENDOLA2> <200205071602.41096.mallah@trade-india.com> <012f01c1f5c8$bad48a00$d5a9fea9@GMENDOLA2> In-Reply-To: <012f01c1f5c8$bad48a00$d5a9fea9@GMENDOLA2> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200205071846.00311.mallah@trade-india.com> X-Archive-Number: 200205/52 X-Sequence-Number: 4227 Thanks Mendola , that was a nice idea for functions.... regds mallah. On Tuesday 07 May 2002 06:41 pm, Gaetano Mendola wrote: > "Rajesh Kumar Mallah." wrote: > > eg > > regression=3D> \o command.sql > > regression=3D> 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