how to drop functions in psql if you do not know the arguments?
run
SELECT 'DROP FUNCTION ' || quote_ident(ns.nspname) || '.' || quote_ident(proname) || '(' || oidvectortypes(proargtypes) || ');'
FROM pg_proc INNER JOIN pg_namespace ns ON (pg_proc.pronamespace = ns.oid)
WHERE ns.nspname = 'my_messed_up_schema' order by proname;
and that should generate correct DROP
statements that you can just paste into psql shell.
Written by Anton Stroganov
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Psql
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#