Re: Deleting Functions - Mailing list pgsql-sql

From Tom Lane
Subject Re: Deleting Functions
Date
Msg-id 24734.1156368876@sss.pgh.pa.us
Whole thread Raw
In response to Re: Deleting Functions  ("Jim Buttafuoco" <jim@contactbda.com>)
List pgsql-sql
"Jim Buttafuoco" <jim@contactbda.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


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: All columns from table in a joined query
Next
From: Peter Eisentraut
Date:
Subject: Re: SQL92 compliance