Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qZ6jm-00433N-50 for pgsql-general@arkaria.postgresql.org; Thu, 24 Aug 2023 09:34:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qZ6jk-006y8e-T0 for pgsql-general@arkaria.postgresql.org; Thu, 24 Aug 2023 09:34:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qZ6jk-006y7c-Dm for pgsql-general@lists.postgresql.org; Thu, 24 Aug 2023 09:34:44 +0000 Received: from mout-u-204.mailbox.org ([2001:67c:2050:101:465::204]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qZ6jg-000gcU-Vg for pgsql-general@lists.postgresql.org; Thu, 24 Aug 2023 09:34:42 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4RWdG15lPvz9sQD; Thu, 24 Aug 2023 11:34:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1692869673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kvcqVEbljJ0M2bXcWW7IWD3SOCma1feNYaaWL11rCr8=; b=Og7fH5Q8lq3Mf7lUTnsS5oZLaEjT7ne+W+Dp0Fsr59rKPz+HYlY7sDCAbAL0AmPd0vAjcK 3WLLLuKXskXcu9P3pKVbFYS1juuoyUmpSDwZE/mPM+IfFGsJTgcl+qWN4ijGd30t4hi8tl ulZdiPoFTtz1u8/WjuRuJeDTRTxhUfLCRZ8Hp0awCiRU3sToi3IT5CBiEu8uQ9P7Gu97Vl /5SMF3/yTwz8KR+4yOLMT6srIr31lXpu0Vo6njbQB+yptFu6XhXRv73AtZ2Vat//PcuX0/ LWmhSXRBMMZM6iUWmefu2mxJB7SLkDJU8t/JJt1HZC8uMttyWTs2dMCVrEUWxw== Date: Thu, 24 Aug 2023 11:34:32 +0200 (CEST) From: Erik Wienhold To: Dominique Devienne , Tom Lane Cc: Hellen Jiang , "pgsql-general@lists.postgresql.org" Message-ID: <924297640.391660.1692869672732@office.mailbox.org> In-Reply-To: References: <3382052.1692812789@sss.pgh.pa.us> Subject: Re: Read only user permission MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 24/08/2023 10:11 CEST Dominique Devienne wrote: > > On Wed, Aug 23, 2023 at 7:46=E2=80=AFPM Tom Lane wrot= e: > > > > 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 plea= se > 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: =09"You can change default privileges only for objects that will be =09 created by yourself or by roles that you are a member of." https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html#SQL= -ALTERDEFAULTPRIVILEGES-DESCRIPTION -- Erik