Re: Role Attribute Bitmask Catalog Representation

From: Andres Freund <andres(at)anarazel(dot)de>
To: Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Role Attribute Bitmask Catalog Representation
Date: 2014-11-25 00:11:14
Message-ID: 20141125001114.GG31915@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-11-24 15:39:22 -0500, Adam Brightwell wrote:
> * int64 (C) to int8 (SQL) mapping for genbki.

That definitely should be a separate patch. Which can be committed much
earlier than the rest - even if we don't actually end up needing it for
this feature, it's still good to have it.

> * replace all role attributes columns in pg_authid with single int64 column
> named rolattr.
> * update CreateRole and AlterRole to use rolattr.
> * update all has_*_privilege functions to check rolattr.
> * builtin SQL function 'has_role_attribute' that takes a role oid and text
> name of the attribute as input and returns a boolean.

I think if we're going to do this - and I'm not yet convinced that
that's the best route, we should add returns all permissions a user
has. Right now that's quite easily queryable, but it won't be after
moving everything into one column. You'd need to manually use all has_*_
functions... Yes, you've added them already to pg_roles, but there's
sometimes good reasons to go to pg_authid instead.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G Johnston 2014-11-25 00:23:32 Re: Role Attribute Bitmask Catalog Representation
Previous Message Alvaro Herrera 2014-11-24 22:58:21 Re: tracking commit timestamps