Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3RtL-0005HG-Ns for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 16:00:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y3RtL-0007cz-0X for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 16:00:59 +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 1Y3RtJ-0007cf-K7 for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 16:00:57 +0000 Received: from quark.amimatica.com ([213.27.130.92]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3RtB-0005dD-Sg for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 16:00:55 +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 6441B547; Tue, 23 Dec 2014 17:00:46 +0100 (CET) Message-ID: <549991AB.1060504@adv-solutions.net> Date: Tue, 23 Dec 2014 17:00:43 +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: Andres Freund CC: pgsql-hackers@postgresql.org, 'Robert Haas' , 'Alvaro Herrera' , Tom Lane Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes References: <31247.1419347882@sss.pgh.pa.us> <20141223152630.GM1768@alvh.no-ip.org> <20141223154611.GE32020@awork2.anarazel.de> In-Reply-To: <20141223154611.GE32020@awork2.anarazel.de> 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 04:46 PM, Andres Freund wrote: > [snip] > I find Tom's concern about needing more > than 64 attributes to be ill-founded; I can't really see that > happening on any timescale that matters. Hmm... most probably, not (or so I hope)... Unless we begin to add many differerent "capabilities", like it was recently suggested. I, for one, have at least two of them to propose, but I guess not that many more should be needed. > I personally would prefer a 'custom' type to represent the > permissions. Internally that could very well be current bitmask, but the > external representation could be more complex (i.e. some textual > representation). That'd make it easy to make the representation wider/more > complex if needed. Indeed, though this would imply adding a new "bitstring?" type to core Postgres. Do you have any further input on what this type would look like ? Any operators that might be useful? ISTM that this would actually be the greatest strength of a type proper (vs. "hardcoded" bit-wise operations in core) In any case, having the type's input/output perform the conversion from/to text is quite equivalent to the current implementation. Considering that this custom type would need to be in core, the differences should be minimal. Or am I missing something obvious? Thanks, / 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