Re: [SQL] Deleting Functions

2006-08-24 Thread Scott Petersen
Thanks for those who responded. It works fine and lasts a long time. The following script does NOT require any editing. It simply executes and works. \pset format unaligned \pset fieldsep '' \pset footer \t \o drops.sql select 'drop function ' || nspname || '.' || proname || '(' || pg_catal

Re: [SQL] Deleting Functions

2006-08-23 Thread Tom Lane
"Jim Buttafuoco" <[EMAIL PROTECTED]> 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

Re: [SQL] Deleting Functions

2006-08-23 Thread Jim Buttafuoco
Scott, I use the following query with psql \o option. Change the schema name from public to whatever. I am sure you could put this into a plpgsql function using execute as well. Jim \o drops.sql select 'drop function ' || nspname || '.' || proname || '(' || pg_catalog.oidvectortypes(p.proar