pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Louis Battuello <louis.battuello@etasseo.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Drop Default Privileges?
Date: Tue, 19 Jun 2018 14:25:16 -0400
Message-ID: <5EA85DC0-289B-43AD-BAC5-DF656A0D710B@etasseo.com> (raw)
In-Reply-To: <8dd0353c-2044-fe7d-13c6-df43563ede1b@portavita.eu>
References: <2CA9A069-45DD-4F47-88C4-0B2685721934@etasseo.com>
	<8dd0353c-2044-fe7d-13c6-df43563ede1b@portavita.eu>



> 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=

view thread (8+ messages)  latest in thread

Message-ID: <5EA85DC0-289B-43AD-BAC5-DF656A0D710B@etasseo.com>
Permalink:  ../5EA85DC0-289B-43AD-BAC5-DF656A0D710B@etasseo.com/
Also on:    postgresql.org/message-id/5EA85DC0-289B-43AD-BAC5-DF656A0D710B@etasseo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: louis.battuello@etasseo.com
  Subject: Re: Drop Default Privileges?
  In-Reply-To: <5EA85DC0-289B-43AD-BAC5-DF656A0D710B@etasseo.com>
  References: <2CA9A069-45DD-4F47-88C4-0B2685721934@etasseo.com> <8dd0353c-2044-fe7d-13c6-df43563ede1b@portavita.eu> <5EA85DC0-289B-43AD-BAC5-DF656A0D710B@etasseo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox