From: David G Johnston <david.g.johnston@gmail.com>
To: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Date: Tue, 23 Dec 2014 11:10:15 -0700 (MST)
Message-ID: <1419358215073-5831869.post@n5.nabble.com> (raw)
In-Reply-To: <5499AA36.3070908@adv-solutions.net>
References: <31247.1419347882@sss.pgh.pa.us>
<20141223153447.GD3062@tamriel.snowman.net>
<31945.1419349892@sss.pgh.pa.us>
<CA+Tgmobz5PzBYvTZErv3Hxw-gERbPx=w9T4+OxwD-f73zDjpYQ@mail.gmail.com>
<20141223161630.GG3062@tamriel.snowman.net>
<379.1419352449@sss.pgh.pa.us>
<20141223170633.GA29601@momjian.us>
<5499AA36.3070908@adv-solutions.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
José Luis Tallón-2 wrote
> 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@
> > 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)
I'm not exploring this at the moment but creating an ASCII table that looks
similar to what pgAdmin outputs would be the best solution. While pgAdmin
would allow for interaction on the table the presentation there is likely
more user-friendly than this (not a high bar to clear...)
Ideally the column headers would go vertical for narrow columns; but even
using header abbreviations with a key would work but the number of columns
should be constant and true indicators used to denote permission.
Spatial factors (position, space/fill, size) provide stronger cues compared
to trying to read a sequence of characters.
David J.
--
View this message in context: http://postgresql.nabble.com/Re-COMMITTERS-pgsql-Use-a-bitmask-to-represent-role-attributes-tp583183...
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: david.g.johnston@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
In-Reply-To: <1419358215073-5831869.post@n5.nabble.com>
References: <31247.1419347882@sss.pgh.pa.us> <20141223153447.GD3062@tamriel.snowman.net> <31945.1419349892@sss.pgh.pa.us> <CA+Tgmobz5PzBYvTZErv3Hxw-gERbPx=w9T4+OxwD-f73zDjpYQ@mail.gmail.com> <20141223161630.GG3062@tamriel.snowman.net> <379.1419352449@sss.pgh.pa.us> <20141223170633.GA29601@momjian.us> <5499AA36.3070908@adv-solutions.net> <1419358215073-5831869.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox