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 1k498Q-0005N6-6F for pgsql-general@arkaria.postgresql.org; Fri, 07 Aug 2020 20:38:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k498P-0004zR-5h for pgsql-general@arkaria.postgresql.org; Fri, 07 Aug 2020 20:38:37 +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 1k498O-0004zC-UD for pgsql-general@lists.postgresql.org; Fri, 07 Aug 2020 20:38:36 +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 1k498M-0000At-T9 for pgsql-general@lists.postgresql.org; Fri, 07 Aug 2020 20:38:35 +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 077KcVMU2798113; Fri, 7 Aug 2020 16:38:31 -0400 From: Tom Lane To: Scott Ribe cc: Adrian Klaver , PostgreSQL General Subject: Re: privileges oddity In-reply-to: References: <20200806185329.GC29590@tamriel.snowman.net> <75f2f28c-9121-c3d0-0c9a-f9b16ef337fb@aklaver.com> <3DF00E97-6D2F-4329-AA0E-9CC2CCD41A8E@elevated-dev.com> <1ceb2a2f-50a0-ef7c-1849-6fa75dd61d64@aklaver.com> <5AA78DA8-746A-4407-AC00-B1463451CAD0@elevated-dev.com> <7efe4d40-5f8d-f3bb-45ff-fd00f3beba84@aklaver.com> <140C61E1-282D-42C2-8349-B5D11792DFCE@elevated-dev.com> <2793218.1596825900@sss.pgh.pa.us> <99994f76-5a45-09a1-c6e3-4021cb4bd385@aklaver.com> <997A0678-B203-432F-AF7D-7ADB6415C28A@elevated-dev.com> <2795205.1596828723@sss.pgh.pa.us> <999BA1C4-FBF8-4EE1-B866-67AD3B500116@elevated-dev.com> Comments: In-reply-to Scott Ribe message dated "Fri, 07 Aug 2020 14:29:29 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2798111.1596832711.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 07 Aug 2020 16:38:31 -0400 Message-ID: <2798112.1596832711@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Scott Ribe writes: > So, one last follow-up, perhaps \du or \du+ should show when a role is m= apped that way. If I'd seen a clue to this setting that had been made "bef= ore I got here" it would have been figured out sooner. \drds does already show this; of course, you have to know to look at it, but the same could be said of \du ... > I realize ALTER ROLE... SET... can be used to set many more defaults, an= d there could be some debate about how much to display with \du[+], but th= e fact that a role abandons all its privs and adopts a different set seems= like pretty important info to surface ;-) IIRC, you aren't the first to get burnt this way. I've wondered for some time if we shouldn't forbid certain GUCs from being set via ALTER ROLE or ALTER DATABASE. "role" and "session authorization" are the poster children here but there might be others. On the other hand, if we do so somebody will likely complain that they have a legit use-case for it. regards, tom lane