Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ow97P-00053O-PK for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Nov 2022 21:41:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ow97O-00072W-L5 for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Nov 2022 21:41:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ow97O-00071T-AN for pgsql-hackers@lists.postgresql.org; Fri, 18 Nov 2022 21:41:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ow97M-0006Xi-43 for pgsql-hackers@postgresql.org; Fri, 18 Nov 2022 21:41:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2AILfktu2271989; Fri, 18 Nov 2022 16:41:46 -0500 From: Tom Lane To: Alexander Korotkov cc: Kyotaro Horiguchi , nathandbossart@gmail.com, steve@supabase.io, pgsql-hackers@postgresql.org Subject: Re: Allow placeholders in ALTER ROLE w/o superuser In-reply-to: <2271312.1668807199@sss.pgh.pa.us> References: <20220719000305.GA3714057@nathanxps13> <20220719165339.GB3716275@nathanxps13> <20220720.152836.1442103646840823302.horikyota.ntt@gmail.com> <1732511.1658332210@sss.pgh.pa.us> <2271312.1668807199@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 18 Nov 2022 16:33:19 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2271987.1668807706.1@sss.pgh.pa.us> Date: Fri, 18 Nov 2022 16:41:46 -0500 Message-ID: <2271988.1668807706@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ... BTW, re-reading the commit message for a0ffa885e: One caveat is that PGC_USERSET GUCs are unaffected by the SET privilege --- one could wish that those were handled by a revocable grant to PUBLIC, but they are not, because we couldn't make it robust enough for GUCs defined by extensions. it suddenly struck me to wonder if the later 13d838815 changed the situation enough to allow revisiting that problem, and/or if storing the source role's OID in pg_db_role_setting would help. I don't immediately recall all the problems that led us to leave USERSET GUCs out of the feature, so maybe this is nuts; but maybe it isn't. It'd be worth considering if we're trying to improve matters here. regards, tom lane