/ Published in: SQL
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
--Below generates sql to delete functions in a particular schema 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;