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

From Tom Lane
Subject Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Date
Msg-id 379.1419352449@sss.pgh.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes  (Stephen Frost <sfrost@snowman.net>)
Responses Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.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



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Proposal: two new role attributes and/or capabilities?
Next
From: Mike Blackwell
Date:
Subject: Re: [PATCH] explain sortorder