Posted By

robe on 12/05/08


Tagged

postgres Postgresql


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

robe


Delete many functions


 / Published in: SQL
 

  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  

You need to login to post a comment.