X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 787FD9FB1E6 for ; Wed, 23 Aug 2006 18:34:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 95074-02 for ; Wed, 23 Aug 2006 21:34:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id CFEBD9FB2E8 for ; Wed, 23 Aug 2006 18:34:37 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k7NLYaXi024735; Wed, 23 Aug 2006 17:34:36 -0400 (EDT) To: jim@contactbda.com cc: Scott Petersen , pgsql-sql@postgresql.org Subject: Re: Deleting Functions In-reply-to: <20060823195430.M44644@contactbda.com> References: <44ECAC88.4060208@softhome.net> <20060823195430.M44644@contactbda.com> Comments: In-reply-to "Jim Buttafuoco" message dated "Wed, 23 Aug 2006 15:56:11 -0400" Date: Wed, 23 Aug 2006 17:34:36 -0400 Message-ID: <24734.1156368876@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.816 tagged_above=0 required=5 tests=SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: *** X-Archive-Number: 200608/173 X-Sequence-Number: 26131 "Jim Buttafuoco" writes: > select 'drop function ' || nspname || '.' || proname || '(' || pg_catalog.oidvectortypes(p.proargtypes) || ');' from > pg_proc p join pg_namespace b on (p.pronamespace=b.oid) where nspname='public'; Seems like you could do that more easily with regprocedure: select 'drop function ' || p.oid::regprocedure || ';' from pg_proc p join pg_namespace b on (p.pronamespace=b.oid) where nspname='public'; [ tries it ... ] ... except that there's no regprocedure-to-text cast. How annoying :-( regards, tom lane