Re: Drop Default Privileges? - Mailing list pgsql-general

From Louis Battuello
Subject Re: Drop Default Privileges?
Date
Msg-id 5EA85DC0-289B-43AD-BAC5-DF656A0D710B@etasseo.com
Whole thread Raw
In response to Re: Drop Default Privileges?  (Fabio Pardi <f.pardi@portavita.eu>)
Responses Re: Drop Default Privileges?  (Pavan Teja <pavan.postgresdba@gmail.com>)
List pgsql-general


On Jun 19, 2018, at 11:38 AM, Fabio Pardi <f.pardi@portavita.eu> wrote:

Hi Louis,

I think 'alter user' can do the job for you.

https://www.postgresql.org/docs/current/static/sql-alteruser.html

Else, as alternative: before running pg_restore, you could edit the dump and replace the string 'ROLE postgres' with the correct user on the RDS instance.

regards,

fabio pardi


Thanks for your replies, David and Fabio.

I thought about editing the dump file or attempting some sort of reassignment of the default privileges, but that still leaves the larger question: can default privileges ever be removed specific to a single schema?

If I set a default of GRANT SELECT, is my only option to change it to REVOKE SELECT? Is there a way to “get rid of the default privileges entry for the role,” as referenced in the Notes section of the of the ALTER DEFAULT PRIVILEGES documentation? Reversing the change from GRANT to REVOKE still leaves a catalog reference to the postgres user oid in pg_default_acl.

I don’t want to reverse the default behavior. I’d like to remove it entirely.

Thanks,
Louis

pgsql-general by date:

Previous
From: Steven Hirsch
Date:
Subject: Question re: pldbgapi
Next
From: Pavan Teja
Date:
Subject: Re: Drop Default Privileges?