Removing the default grant of EXECUTE on functions/procedures to PUBLIC - Mailing list pgsql-general

From Tefft, Michael J
Subject Removing the default grant of EXECUTE on functions/procedures to PUBLIC
Date
Msg-id BN8PR04MB6289E694A40BE7DF913754A1D0DF2@BN8PR04MB6289.namprd04.prod.outlook.com
Whole thread Raw
Responses Re: Removing the default grant of EXECUTE on functions/procedures to PUBLIC
Re: Removing the default grant of EXECUTE on functions/procedures to PUBLIC
List pgsql-general

I am trying to remove the default grant of EXECUTE on all functions/procedures to PUBLIC.

From my reading, there is no straightforward way to do this. For example,

ALTER DEFAULT PRIVILEGES REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC;

Does not apply this across the entire cluster (or database) but only applies to the role who issued it (and objects yet to be created by that role) .

So I am arriving at the conclusion that I need to alter the default privileges for every existing role (which I expected), and ensure that default privileges are altered for every new role that is created going forward.

 

Have I analyzed this correctly?

 

Thanks,

Mike Tefft

pgsql-general by date:

Previous
From: Krishnakant Mane
Date:
Subject: confused about material view locks please explain
Next
From: "David G. Johnston"
Date:
Subject: Re: Removing the default grant of EXECUTE on functions/procedures to PUBLIC