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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: 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 16:34:09
Message-ID: 379.1419352449@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2014-12-23 17:06:33 Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Previous Message Stephen Frost 2014-12-23 16:22:09 Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes

Browse pgsql-hackers by date

  From Date Subject
Next Message Mike Blackwell 2014-12-23 16:50:40 Re: [PATCH] explain sortorder
Previous Message Stephen Frost 2014-12-23 16:29:43 Re: Proposal: two new role attributes and/or capabilities?