Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3SPb-0006pc-8f for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 16:34:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y3SPa-0006Ct-Pp for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 16:34:18 +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 1Y3SPZ-0006Cm-4c for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 16:34:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y3SPW-0006DZ-40 for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 16:34:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sBNGY9IM000380; Tue, 23 Dec 2014 11:34:09 -0500 From: Tom Lane To: Stephen Frost cc: Robert Haas , Alvaro Herrera , "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes In-reply-to: <20141223161630.GG3062@tamriel.snowman.net> References: <31247.1419347882@sss.pgh.pa.us> <20141223153447.GD3062@tamriel.snowman.net> <31945.1419349892@sss.pgh.pa.us> <20141223161630.GG3062@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Tue, 23 Dec 2014 11:16:31 -0500" Date: Tue, 23 Dec 2014 11:34:09 -0500 Message-ID: <379.1419352449@sss.pgh.pa.us> 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 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. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers