Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes - Mailing list pgsql-hackers

From José Luis Tallón
Subject Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Date
Msg-id 549991AB.1060504@adv-solutions.net
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
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.




pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Next
From: Robert Haas
Date:
Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes