Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. CREATE OR REPLACE FUNCTION schema.abort_adding_column()
  2. RETURNS event_trigger
  3. LANGUAGE plpgsql
  4. AS $$
  5.  
  6. DECLARE
  7. obj record;
  8.  
  9. BEGIN
  10. For obj IN SELECT * FROM information_schema.tables AND table_schema IN ('schema1') AND table_catalog = 'database1';
  11. LOOP
  12. RAISE EXCEPTION 'command % is not allowed on %s, see blah blah for more details.', tg_tag;
  13. END LOOP;
  14. END;
  15. $$;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement