Re: Role Attribute Bitmask Catalog Representation - Mailing list pgsql-hackers

From Adam Brightwell
Subject Re: Role Attribute Bitmask Catalog Representation
Date
Msg-id CAKRt6CTL9Y7wvt2Ti5T6OdezX4f3gLf=HxPUx3vO7GXV0ATciQ@mail.gmail.com
Whole thread Raw
In response to Re: Role Attribute Bitmask Catalog Representation  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Role Attribute Bitmask Catalog Representation  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
All,

I have attached a patch that addresses the current suggestions and recommendations:

* Add 'get_all_role_attributes' SQL function - returns a text array representation of the attributes from a value passed to it.

Example:

postgres=# SELECT rolname, get_all_role_attributes(rolattr) AS rolattr FROM pg_authid;
 rolname  |                                            rolattr                                            
----------+-----------------------------------------------------------------------------------------------
 postgres | {Superuser,Inherit,"Create Role","Create DB","Catalog Update",Login,Replication,"Bypass RLS"}
(1 row)

* Refactor #define's from 'parsenodes.h' to 'acl.h'
* Added #define ROLE_ATTR_ALL to represent all currently available attributes.
* Added genbki.pl substitution for  PGROLEATTRALL constant.

Please let me know what you think, all feedback is greatly appreciated.

Thanks,
Adam

--
Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: How to use brin indexes?
Next
From: David Rowley
Date:
Subject: Re: Marginal performance improvement: replace bms_first_member loops