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 1pjkbT-0006nJ-J8 for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Apr 2023 17:37:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pjkbS-0006uS-7a for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Apr 2023 17:37:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pjkbR-0006uI-UP for pgsql-hackers@lists.postgresql.org; Tue, 04 Apr 2023 17:37:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pjkbN-000s6g-Jy for pgsql-hackers@lists.postgresql.org; Tue, 04 Apr 2023 17:37:51 +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 334HbkBE1575396; Tue, 4 Apr 2023 13:37:46 -0400 From: Tom Lane To: Robert Haas cc: "David G. Johnston" , Pavel Luzanov , David Zhang , "pgsql-hackers@lists.postgresql.org" Subject: Re: psql: Add role's membership options to the \du+ command In-reply-to: References: <01620d6b-9efe-b199-b619-8450d865ec83@postgrespro.ru> <94ce7392-fa90-bc1c-4dc2-677161bbff58@postgrespro.ru> <20824093-d94f-e5d6-b611-8cec7fc6e95e@postgrespro.ru> <42678ca5-f3c6-db1b-e0c5-c63c3ce8997e@postgrespro.ru> <1518709.1680624790@sss.pgh.! pa.us> <1525117.1680628353@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 04 Apr 2023 13:29:10 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1575394.1680629866.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 04 Apr 2023 13:37:46 -0400 Message-ID: <1575395.1680629866@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Tue, Apr 4, 2023 at 1:12 PM Tom Lane wrote: >> I wonder if, while we're here, we should apply the idea of >> joining-with-newlines-not-commas to the attributes column too. > That would make the column narrower, which might be good, because it > seems to me that listing the memberships could require quite a lot of > space, both vertical and horizontal. Right, that's what I was thinking. > There can be any number of memberships, and each of those memberships > has a grantor and three flag bits (INHERIT, SET, ADMIN). If some user > with a long username has been granted membership with all three of > those flags by a grantor who also has a long username, and if we show > all that information, we're going to use up a lot of horizontal space. > And if there are many such grants, also a lot of vertical space. Yup --- and if you were incautious enough to not exclude the bootstrap superuser, then you'll also have a very wide Attributes column. We can buy back some of that by joining the attributes with newlines. At some point people are going to have to resort to \x mode for this display, but we should do what we can to put that off as long as we're not sacrificing readability. regards, tom lane