I've just been added to a project using Postgresql 11.4 where database security has been an afterthought. As part of tightening things up, I've used ALTER DEFAULT PERMISSIONS
to set sane ACLs on any new objects (schemas, tables, functions, sequences) created. However, there are hundreds of existing objects already in this database with wacko permissions.
Is there a command that will reset the permissions of an object (or group of objects) to the defaults (as seen with \ddp
)? Something like the equivalent of REASSIGN OWNED
for object ownership, but instead for acls.