Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes

From: José Luis Tallón <jltallon(at)adv-solutions(dot)net>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, 'Robert Haas' <robertmhaas(at)gmail(dot)com>, 'Alvaro Herrera' <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Date: 2014-12-23 16:00:43
Message-ID: 549991AB.1060504@adv-solutions.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2014-12-23 16:02:42 Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Previous Message Stephen Frost 2014-12-23 15:55:01 Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-12-23 16:02:42 Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Previous Message Stephen Frost 2014-12-23 15:55:01 Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes