Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3Sv2-0007xJ-Gb for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 17:06:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y3Sv1-0001NN-Tx for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 17:06:47 +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 1Y3Suz-0001NE-8o for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 17:06:45 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Y3Suq-0006rQ-SO for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 17:06:43 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Y3Sun-0001aZ-Ed; Tue, 23 Dec 2014 12:06:33 -0500 Date: Tue, 23 Dec 2014 12:06:33 -0500 From: Bruce Momjian To: Tom Lane Cc: Stephen Frost , Robert Haas , Alvaro Herrera , "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes Message-ID: <20141223170633.GA29601@momjian.us> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <379.1419352449@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) 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 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. 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. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers