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 1qwfCp-00DYqV-BV for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Oct 2023 09:02:07 +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 1qwfCn-003mx2-Ij for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Oct 2023 09:02:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qwfCn-003mwu-8f for pgsql-hackers@lists.postgresql.org; Sat, 28 Oct 2023 09:02:05 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qwfCk-003L8W-5J for pgsql-hackers@lists.postgresql.org; Sat, 28 Oct 2023 09:02:04 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5409bc907edso4345094a12.0 for ; Sat, 28 Oct 2023 02:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698483721; x=1699088521; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:subject:cc:to:from:date :sender:message-id:from:to:cc:subject:date:message-id:reply-to; bh=3LC0HHzXFT6if7Jp2tX3TLgvUub4KdVdfGLUJ1G2PHY=; b=NzDZVT4vvOUXqvvby5tY0kwpwBHqHqqVzaqnFH/Mlwgnc9wX2nqrJ4jDHrTtjsuPe7 MW8ely3cCUKu/elbCs+quR5GLfKx1rhJe7soSUPtFPmsh75VEvkukdWu30eufkGKssx+ gu0jTG4MBy0lyPJHEw0yXtawcl0yirOEOZOs23jIZtZFC+/DA1f3HBNgJEXk9lXDGuxp De+A6nMYn4zDQfJI0qgEKdpQ2RXkbLF3khtI+nSPVkqk1AwqmEeKB5i4UqcOlEKIVRUe UvmFYlvJ32tfq9kkILQXbBt3qFn3aI+AhSGinTzcaWIyIDv7W9jU1WcqxnseiM8vPXDA iMUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698483721; x=1699088521; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:subject:cc:to:from:date :sender:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3LC0HHzXFT6if7Jp2tX3TLgvUub4KdVdfGLUJ1G2PHY=; b=HVPFmlWVBq1BRouTO1L6VyQijiGgkmI1eoY3Wss6tX8YMJtRbFKfcXthYEPtapsA4n BiNQR4pxBt8Xs7qeFBPj/Eg15z6aQJf4ENuDNZPAuW5krwox25PEqq877/JIIaLJ5vnx CtcRqz0awcG6ErzKkSZLYsFWJfIeNPy5JafxO0a4r7a+2kMsxVccut3HtRtdsl2N2YSe 0vdcidtN0AdTTcULIf0seSXH7RyDLz7qpKaVt0qTqzlys2I/OMVzMgru+gZ+Sd6+0MFZ W02BCfmeXRGAhFWEilO5xf1/ErEoGj8h3vC0Vk/9CvlHiQcCYkB2Hzum5nOMSuytigvN bjww== X-Gm-Message-State: AOJu0YxIxUSIdFEI83F7Y49Q/Xl6s30VhpKXLSeQ/1wPrHDY+zw8Ts3l CYgLd9FAWDMkEM6o5SLASow= X-Google-Smtp-Source: AGHT+IFBiG9AFQKt6aIONyNWoQHFQTANGsM4gQQpCR2pjfQJ0t65kfBcUOGgrY8LXC+z5UmvwI8mrw== X-Received: by 2002:a05:6402:1646:b0:53d:fde3:a99 with SMTP id s6-20020a056402164600b0053dfde30a99mr4197542edx.17.1698483720546; Sat, 28 Oct 2023 02:02:00 -0700 (PDT) Received: from lightning.caipicrew.dd-dns.de ([2001:a61:34cf:1001:f11c:3b32:31b7:711]) by smtp.gmail.com with ESMTPSA id cb25-20020a0564020b7900b00536031525e5sm2489517edb.91.2023.10.28.02.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 02:02:00 -0700 (PDT) Message-ID: <653cce08.050a0220.a10fb.7878@mx.google.com> X-Google-Original-Message-ID: <20231028090159.GW27104@caipicrew.dd-dns.de;lightning.caipicrew.dd-dns.de> Sender: Michael Banck Received: from mbanck by lightning.caipicrew.dd-dns.de with local (Exim 4.92) (envelope-from ) id 1qwfCh-0007BX-KR; Sat, 28 Oct 2023 11:01:59 +0200 Date: Sat, 28 Oct 2023 11:01:59 +0200 From: Michael Banck To: Laurenz Albe Cc: David Burns , pgsql-hackers@lists.postgresql.org Subject: Re: Version 14/15 documentation Section "Alter Default Privileges" References: <4a6f157edc4ae38a2050a5893e6729cbb98113bc.camel@cybertec.at> <653b841d.a70a0220.17f72.2c12@mx.google.com> <7de5f33f49a91d7b30b8c01fe46fc280713ebae1.camel@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7de5f33f49a91d7b30b8c01fe46fc280713ebae1.camel@cybertec.at> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Fri, Oct 27, 2023 at 05:49:42PM +0200, Laurenz Albe wrote: > On Fri, 2023-10-27 at 11:34 +0200, Michael Banck wrote: > > On Fri, Oct 27, 2023 at 09:03:04AM +0200, Laurenz Albe wrote: > > > On Fri, 2022-11-04 at 10:49 +0100, Laurenz Albe wrote: > > > > On Thu, 2022-11-03 at 11:32 +0100, Laurenz Albe wrote: > > > > > On Wed, 2022-11-02 at 19:29 +0000, David Burns wrote: > > > > > > Some additional clarity in the versions 14/15 documentation > > > > > > would be helpful specifically surrounding the "target_role" > > > > > > clause for the ALTER DEFAULT PRIVILEGES command. To the > > > > > > uninitiated, the current description seems vague.  Maybe > > > > > > something like the following would help: > > > > > > > > After some more thinking, I came up with the attached patch. > > > > > I think something like this is highly useful because I have also seen > > people very confused why default privileges are not applied. > > > > However, maybe it could be made even clearer if also the main > > description is amended, like > > > > "You can change default privileges only for objects that will be created > > by yourself or by roles that you are a member of (via target_role)." > > > > or something. > > True. I have done that in the attached patch. > In this patch, it is mentioned *twice* that ALTER DEFAULT PRIVILEGES > only affects objects created by the current user. I thought that > would not harm, but if it is too redundant, I can remove the second > mention. I think it is fine, and I have marked the patch as ready-for-committer. I think it should be applied to all branches, not just 14/15 as mentioned in the subject. Michael