From: | José Luis Tallón <jltallon(at)adv-solutions(dot)net> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | "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 17:45:26 |
Message-ID: | 5499AA36.3070908@adv-solutions.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On 12/23/2014 06:06 PM, Bruce Momjian wrote:
> On Tue, Dec 23, 2014 at 11:34:09AM -0500, Tom Lane wrote:
>> Stephen Frost <sfrost(at)snowman(dot)net> writes:
>>> 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.
>> We could have that regardless of the representation, if the function is
>> defined along the lines of "given a user OID, give me a text string
>> representing the user's attributes". However, that only helps for
>> pg_dumpall and any other clients whose requirement is exactly satisfied
>> by a string that fits into CREATE/ALTER USER. The current formatting
>> of psql's \du, for example, absolutely requires adding more client-side
>> code every time we add a property; whether the catalog representation is
>> bools or a bitmask really isn't going to change the pain level much there.
> 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. Adding the complexity of a bitmap doesn't make sense here.
Well, the code simplification alone might be worth the effort... and it
does make adding additional attributes easier.
> I also apologize for the late feedback.
>
> Offtopic, what I would really _love_ to see improved is our display of
> object permissions:
>
> Access privileges
> Schema | Name | Type | Access privileges | Column privileges | Policies
> --------+--------+-------+---------------------------+-------------------+----------
> public | crypto | table | postgres=arwdDxt/postgres+| |
> | | | =r/postgres | |
>
> That is nasty user display --- it looks like line noise.
Hmm... http://www.postgresql.org/docs/9.4/static/sql-grant.html does
describe the mapping from letters to permissions, but I agree that it
could be easier for beginners.
Any idea on how this display can be made more "human friendly"? (just
for the sake of discussion --- I don't think I have time to do much
about that, unfortunately)
Cheers,
/ J.L.
From | Date | Subject | |
---|---|---|---|
Next Message | David G Johnston | 2014-12-23 18:10:15 | Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes |
Previous Message | Bruce Momjian | 2014-12-23 17:06:33 | Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes |
From | Date | Subject | |
---|---|---|---|
Next Message | David G Johnston | 2014-12-23 18:01:55 | Re: Proposal: two new role attributes and/or capabilities? |
Previous Message | Andres Freund | 2014-12-23 17:41:29 | Re: Suppressing elog.c context messages (was Re: Wait free LW_SHARED acquisition) |