Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3TWY-0000rm-K8 for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 17:45:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y3TWY-0006ZD-0B for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 17:45:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y3TWW-0006Z6-6g for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 17:45:32 +0000 Received: from quark.amimatica.com ([213.27.130.92]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3TWS-0007bO-RX for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 17:45:30 +0000 Received: from vortex.hq.g4ii.com (182.Red-88-26-239.staticIP.rima-tde.net [88.26.239.182]) by quark.amimatica.com (Postfix) with ESMTPA id 1F511747; Tue, 23 Dec 2014 18:45:28 +0100 (CET) Message-ID: <5499AA36.3070908@adv-solutions.net> Date: Tue, 23 Dec 2014 18:45:26 +0100 From: =?windows-1252?Q?Jos=E9_Luis_Tall=F3n?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0 MIME-Version: 1.0 To: Bruce Momjian CC: "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes References: <31247.1419347882@sss.pgh.pa.us> <20141223153447.GD3062@tamriel.snowman.net> <31945.1419349892@sss.pgh.pa.us> <20141223161630.GG3062@tamriel.snowman.net> <379.1419352449@sss.pgh.pa.us> <20141223170633.GA29601@momjian.us> In-Reply-To: <20141223170633.GA29601@momjian.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 12/23/2014 06:06 PM, Bruce Momjian wrote: > On Tue, Dec 23, 2014 at 11:34:09AM -0500, Tom Lane wrote: >> Stephen Frost writes: >>> If that's the only consideration for this, well, that's certainly quite >>> straight-forward to change in the other direction too. The new function >>> suggested by Andres actually makes it really easy to get a textual list >>> of all the role attributes which a role has from the bitmask too. >> We could have that regardless of the representation, if the function is >> defined along the lines of "given a user OID, give me a text string >> representing the user's attributes". However, that only helps for >> pg_dumpall and any other clients whose requirement is exactly satisfied >> by a string that fits into CREATE/ALTER USER. The current formatting >> of psql's \du, for example, absolutely requires adding more client-side >> code every time we add a property; whether the catalog representation is >> bools or a bitmask really isn't going to change the pain level much there. > I am with Tom on this --- there is more wasted space in the 'name' > column pg_authid.rolname than by shoving 40 boolean values into a > bitmap. Adding the complexity of a bitmap doesn't make sense here. Well, the code simplification alone might be worth the effort... and it does make adding additional attributes easier. > I also apologize for the late feedback. > > Offtopic, what I would really _love_ to see improved is our display of > object permissions: > > Access privileges > Schema | Name | Type | Access privileges | Column privileges | Policies > --------+--------+-------+---------------------------+-------------------+---------- > public | crypto | table | postgres=arwdDxt/postgres+| | > | | | =r/postgres | | > > That is nasty user display --- it looks like line noise. Hmm... http://www.postgresql.org/docs/9.4/static/sql-grant.html does describe the mapping from letters to permissions, but I agree that it could be easier for beginners. Any idea on how this display can be made more "human friendly"? (just for the sake of discussion --- I don't think I have time to do much about that, unfortunately) Cheers, / J.L. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers