Skip site navigation (1) Skip section navigation (2)

pgsql: Add support for privileges on types

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add support for privileges on types
Date: 2011-12-19 22:08:28
Message-ID: E1RclNk-0003m0-E7@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Add support for privileges on types

This adds support for the more or less SQL-conforming USAGE privilege
on types and domains.  The intent is to be able restrict which users
can create dependencies on types, which restricts the way in which
owners can alter types.

reviewed by Yeb Havinga

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/729205571e81b4767efc42ad7beb53663e08d1ff

Modified Files
--------------
doc/src/sgml/information_schema.sgml           |   35 ++--
doc/src/sgml/ref/alter_default_privileges.sgml |   12 +-
doc/src/sgml/ref/alter_foreign_table.sgml      |    2 +
doc/src/sgml/ref/alter_table.sgml              |    3 +
doc/src/sgml/ref/alter_type.sgml               |    2 +
doc/src/sgml/ref/create_aggregate.sgml         |    7 +
doc/src/sgml/ref/create_cast.sgml              |    9 +-
doc/src/sgml/ref/create_domain.sgml            |    5 +
doc/src/sgml/ref/create_foreign_table.sgml     |    5 +
doc/src/sgml/ref/create_function.sgml          |    5 +
doc/src/sgml/ref/create_operator.sgml          |    7 +
doc/src/sgml/ref/create_table.sgml             |    6 +
doc/src/sgml/ref/create_type.sgml              |    5 +
doc/src/sgml/ref/grant.sgml                    |   19 ++-
doc/src/sgml/ref/psql-ref.sgml                 |    6 +-
doc/src/sgml/ref/revoke.sgml                   |   12 +
src/backend/access/common/tupdesc.c            |    9 +
src/backend/catalog/aclchk.c                   |  271 +++++++++++++++++++++
src/backend/catalog/information_schema.sql     |   84 +++++--
src/backend/catalog/pg_aggregate.c             |   23 ++
src/backend/catalog/pg_type.c                  |    9 +
src/backend/commands/functioncmds.c            |   24 ++
src/backend/commands/operatorcmds.c            |   24 ++
src/backend/commands/tablecmds.c               |   22 ++
src/backend/commands/typecmds.c                |    5 +
src/backend/executor/execMain.c                |   15 ++
src/backend/parser/gram.y                      |   19 ++-
src/backend/utils/adt/acl.c                    |  207 ++++++++++++++++
src/bin/psql/describe.c                        |   12 +
src/bin/psql/tab-complete.c                    |    8 +-
src/include/catalog/catversion.h               |    2 +-
src/include/catalog/pg_class.h                 |    2 +-
src/include/catalog/pg_default_acl.h           |    1 +
src/include/catalog/pg_proc.h                  |   13 +
src/include/catalog/pg_type.h                  |  305 ++++++++++++------------
src/include/nodes/parsenodes.h                 |    4 +-
src/include/parser/kwlist.h                    |    1 +
src/include/utils/acl.h                        |    4 +
src/include/utils/builtins.h                   |    6 +
src/test/regress/expected/privileges.out       |  116 +++++++++-
src/test/regress/sql/privileges.sql            |  124 ++++++++++
41 files changed, 1249 insertions(+), 201 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2011-12-20 20:01:24
Subject: pgsql: Avoid crashing when we have problems unlinking filespost-commit
Previous:From: Alvaro HerreraDate: 2011-12-19 20:46:02
Subject: Re: pgsql: Allow CHECK constraints to be declared ONLY

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group