Re: Deleting Functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jim(at)contactbda(dot)com
Cc: Scott Petersen <scottpetersen(at)softhome(dot)net>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Deleting Functions
Date: 2006-08-23 21:34:36
Message-ID: 24734.1156368876@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Jim Buttafuoco" <jim(at)contactbda(dot)com> 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2006-08-24 06:42:49 Re: SQL92 compliance
Previous Message Tom Lane 2006-08-23 21:26:57 Re: All columns from table in a joined query