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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Date: 2014-12-23 18:43:47
Message-ID: 20141223184347.GK3062@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

* Bruce Momjian (bruce(at)momjian(dot)us) wrote:
> I am with Tom on this --- there is more wasted space in the 'name'
> column pg_authid.rolname than by shoving 40 boolean values into a
> bitmap.

I agree that we waste a lot of space in 'name' but I don't think there's
an easy solution to that problem. This, on the other hand, seemed like
a relatively minor change to an internal catalog definition.

> Adding the complexity of a bitmap doesn't make sense here. I
> also apologize for the late feedback.

The complexity of the bitmap on the SQL side actually makes the code
side cleaner. :/

It would be great to figure out a way to get feedback like this earlier
on in the development. This patch has been floating around for quite a
while, with intentional breaks for feedback taken prior to incremental
improvements and documentation additions. Clearly that gets back to the
discussion around the commitfest situation.

> Offtopic, what I would really _love_ to see improved is our display of
> object permissions:

That's a whole different discussion and really belongs on a new thread.
I'm certainly curious what ideas you have regarding how to fix this;
it's not like Unix permission display is particularly elegant. Is there
something you've seen that looks nicer while still conveying the
necessary information in a relatively small amount of space?

Thanks,

Stephen

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2014-12-23 18:54:18 Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Previous Message Alvaro Herrera 2014-12-23 18:38:49 pgsql: Revert "Use a bitmask to represent role attributes"

Browse pgsql-hackers by date

  From Date Subject
Next Message José Luis Tallón 2014-12-23 18:49:56 Re: Proposal: two new role attributes and/or capabilities?
Previous Message Alvaro Herrera 2014-12-23 18:41:28 Re: replicating DROP commands across servers