pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Wienhold <ewie@ewie.name>
To: Dominique Devienne <ddevienne@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Hellen Jiang <hjiang@federatedwireless.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Read only user permission
Date: Thu, 24 Aug 2023 11:34:32 +0200 (CEST)
Message-ID: <924297640.391660.1692869672732@office.mailbox.org> (raw)
In-Reply-To: <CAFCRh-8Cf=7BLg5=Bck89sbhYw9vmiHnSsntxpKFR3mS-2ynfw@mail.gmail.com>
References: <BLAPR17MB419317757B0A5D24F5076CBCD21CA@BLAPR17MB4193.namprd17.prod.outlook.com>
	<3382052.1692812789@sss.pgh.pa.us>
	<CAFCRh-8Cf=7BLg5=Bck89sbhYw9vmiHnSsntxpKFR3mS-2ynfw@mail.gmail.com>

> On 24/08/2023 10:11 CEST Dominique Devienne <ddevienne@gmail.com> wrote:
>
> On Wed, Aug 23, 2023 at 7:46 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >
> > The readwrite user (not the admin) would need to issue ALTER DEFAULT
> > PRIVILEGES granting that.
>
> Hi. I'm confused Tom. Why should it matter who created the new tables?
>
> I'm also using DEFAULT PRIVILEGES, for the very reason they dynamically
> extend to newly created objects in the schema.
> And I don't remember reading anything like what you imply. Could you please
> pinpoint in the doc where this would be explained?
>
> DEFAULT PRIVILEGES only apply to DDLs made by the role who did the GRANT'ing?
>
> In my case, the schema owner does both the granting and DDLs, so I guess I'll
> be OK.
> I just want to make sure I understand the situation better. Thanks, --DD

This is implied by:

	"You can change default privileges only for objects that will be
	 created by yourself or by roles that you are a member of."

https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html#SQL-ALTERDEFAULTPRIVILEGES-D...

--
Erik





view thread (10+ messages)  latest in thread

Message-ID: <924297640.391660.1692869672732@office.mailbox.org>
Permalink:  ../924297640.391660.1692869672732@office.mailbox.org/
Also on:    postgresql.org/message-id/924297640.391660.1692869672732@office.mailbox.org

 · 

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: ewie@ewie.name, ddevienne@gmail.com, tgl@sss.pgh.pa.us, hjiang@federatedwireless.com
  Subject: Re: Read only user permission
  In-Reply-To: <924297640.391660.1692869672732@office.mailbox.org>
  References: <BLAPR17MB419317757B0A5D24F5076CBCD21CA@BLAPR17MB4193.namprd17.prod.outlook.com> <3382052.1692812789@sss.pgh.pa.us> <CAFCRh-8Cf=7BLg5=Bck89sbhYw9vmiHnSsntxpKFR3mS-2ynfw@mail.gmail.com> <924297640.391660.1692869672732@office.mailbox.org>

* 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