Skip to main content
edited tags
Link
mustaccio
  • 26.9k
  • 24
  • 58
  • 74
Source Link

ALTER DEFAULT PRIVILEGES IN SCHEMA vs ALTER DEFAULT PRIVILEGES FOR ROLE, what is the difference?

What is the functional difference between these two commands?

ALTER DEFAULT PRIVILEGES IN SCHEMA schema_name REVOKE ALL ON FUNCTIONS FROM old_role;

ALTER DEFAULT PRIVILEGES FOR ROLE old_role IN SCHEMA schema_name 
    REVOKE ALL PRIVILEGES ON FUNCTIONS FROM old_role

Do they achieve the same thing, or is each one specifically doing something different? If so, what?

Thanks!