pgsql: Use a bitmask to represent role attributes

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use a bitmask to represent role attributes
Date: 2014-12-23 13:22:48
Message-ID: E1Y3PQG-0006Hc-Ff@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Use a bitmask to represent role attributes

The previous representation using a boolean column for each attribute
would not scale as well as we want to add further attributes.

Extra auxilliary functions are added to go along with this change, to
make up for the lost convenience of access of the old representation.

Catalog version bumped due to change in catalogs and the new functions.

Author: Adam Brightwell, minor tweaks by Álvaro
Reviewed by: Stephen Frost, Andres Freund, Álvaro Herrera

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1826987a46d079458007b7b6bbcbbd852353adbb

Modified Files
--------------
doc/src/sgml/catalogs.sgml | 127 ++++++++----
doc/src/sgml/func.sgml | 127 ++++++++++++
src/backend/access/transam/xlogfuncs.c | 5 +-
src/backend/catalog/Catalog.pm | 2 +-
src/backend/catalog/Makefile | 2 +-
src/backend/catalog/aclchk.c | 125 ++++++------
src/backend/catalog/genbki.pl | 3 +
src/backend/catalog/information_schema.sql | 7 +-
src/backend/catalog/objectaddress.c | 2 +-
src/backend/catalog/system_views.sql | 28 +--
src/backend/commands/dbcommands.c | 27 +--
src/backend/commands/user.c | 244 ++++++++++++++----------
src/backend/commands/variable.c | 8 +-
src/backend/replication/logical/logicalfuncs.c | 16 +-
src/backend/replication/slotfuncs.c | 3 +-
src/backend/rewrite/rowsecurity.c | 2 +-
src/backend/utils/adt/acl.c | 200 +++++++++++++++++--
src/backend/utils/adt/ri_triggers.c | 2 +-
src/backend/utils/init/miscinit.c | 23 +--
src/backend/utils/init/postinit.c | 2 +-
src/backend/utils/misc/superuser.c | 4 +-
src/bin/pg_dump/pg_dumpall.c | 14 +-
src/include/catalog/acldefs.h | 72 +++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_authid.h | 34 ++--
src/include/catalog/pg_proc.h | 13 ++
src/include/nodes/parsenodes.h | 28 +--
src/include/utils/acl.h | 14 +-
src/include/utils/builtins.h | 6 +
src/test/regress/expected/rules.out | 28 +--
30 files changed, 798 insertions(+), 372 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-12-23 15:18:02 Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Previous Message Alvaro Herrera 2014-12-23 12:37:49 Re: pgsql: get_object_address: separate domain constraints from table const

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-12-23 13:28:26 Re: Role Attribute Bitmask Catalog Representation
Previous Message Teodor Sigaev 2014-12-23 13:02:22 Re: compress method for spgist - 2