Re: Role Attribute Bitmask Catalog Representation

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Role Attribute Bitmask Catalog Representation
Date: 2014-12-19 17:36:50
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera wrote:
> The fact that the ROLE_ATTR_* definitions are in pg_authid.h means that
> there are now a lot of files that need to include that one. I think the
> includes relative to ACLs and roles is rather messy now, and this patch
> makes it a bit worse.
> I think we should create a new header file (maybe acltypes.h or
> acldefs.h), which only contains the AclMode and RoleAttr typedefs and
> their associated defines; that one would be included from parsenodes.h,
> acl.h and pg_authid.h. Everything else would be in acl.h. So code that
> currently checks permissions using only acl.h do not need any extra
> includes.

I propose this patch on top of Adam's v5. Also included is a full patch
against master.

Unrelated: when changing from unified to context format, I saw
filterdiff fail to produce a complete patch, skipping some hunks in its
output. My first impression was that I had dropped some hunks in git,
so I wasted some time comparing v5 and v6 by hand before remembering
that Michael Paquier had mentioned this problem previously.

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
role-attribute-bitmask-v5a.patch text/x-diff 23.1 KB
role-attribute-bitmask-v6.patch text/x-diff 68.3 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2014-12-19 17:44:54 Re: NUMERIC private methods?
Previous Message Arthur Silva 2014-12-19 17:04:40 Re: Commitfest problems