Delete many functions


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  1. --Below generates sql to delete functions in a particular schema
  2. SELECT 'DROP FUNCTION ' || quote_ident(ns.nspname) || '.' || quote_ident(proname) || '(' || oidvectortypes(proargtypes) || ');'
  3. FROM pg_proc INNER JOIN pg_namespace ns ON (pg_proc.pronamespace = ns.oid)
  4. WHERE ns.nspname = 'my_messed_up_schema' ORDER BY proname;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.