X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 8CA53310ACF for ; Mon, 30 Jun 2003 23:41:12 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 06710-09 for ; Mon, 30 Jun 2003 20:41:02 -0300 (ADT) Received: from smtp.noos.fr (nan-smtp-08.noos.net [212.198.2.77]) by svr1.postgresql.org (Postfix) with ESMTP id 9229C3109FA for ; Mon, 30 Jun 2003 20:41:01 -0300 (ADT) Received: (qmail 349307 invoked by uid 0); 30 Jun 2003 23:41:00 -0000 Received: from unknown (HELO gmendola) ([212.198.37.110]) (envelope-sender ) by 212.198.2.77 (qmail-ldap-1.03) with SMTP for ; 30 Jun 2003 23:41:00 -0000 Message-ID: <002401c33f82$75081c30$10d4a8c0@mm.eutelsat.org> From: "Mendola Gaetano" To: "Tomasz Myrta" , "PGSQL-SQL" References: <3F00A7F8.80107@klaster.net> Subject: Re: cleaning up useless pl/pgsql functions Date: Tue, 1 Jul 2003 05:40:03 +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.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Archive-Number: 200306/352 X-Sequence-Number: 14110 "Tomasz Myrta" wrote: > Hi > Do you have any easy script to remove all pl/pgsql function? After a lot of > changes inside "create or replace function..." scripts I have a big mess. I > want to remove all user defined pl/pgsql functions and restore some of them > from my scripts again. You shall be able to identify the name of your own function and do: SELECT 'DROP function ' || proname || ' ('|| oidvectortypes(proargtypes) || ');' from pg_proc WHERE proname ~ '^sp_'; I identify my own function because the prefix sp_. I hope that this help you. Gaetano