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

From Stephen Frost
Subject Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Date
Msg-id 20141223161630.GG3062@tamriel.snowman.net
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
> On Tue, Dec 23, 2014 at 10:51 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Meh.  To the extent that users look at pg_roles rather than pg_authid,
> > it's going to look like another 15 boolean columns to them anyway ...
> > except that now, those columns are suddenly a lot more expensive to read.
>
> Ugh.  I think that's actually a really good point.  I guess I'll +1
> reverting this, then.

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.  I was
more concerned with the on-disk and C-level structure and size than
about the time required to get at the value of each bit at the
SQL-level.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: bin checks taking too long.
Next
From: José Luis Tallón
Date:
Subject: Proposal: two new role attributes and/or capabilities?