Skip to main content
1 of 2

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!