Improve reporting of permission errors for array types
Because permissions are assigned to element types, not array types,
complaining about permission denied on an array type would be
misleading to users. So adjust the reporting to refer to the element
type instead.
In order not to duplicate the required logic in two dozen places,
refactor the permission denied reporting for types a bit.
pointed out by Yeb Havinga during the review of the type privilege
feature
Branch
------
REL9_2_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/0b847cba696b0426694e5f48aa95455269624e87
Modified Files
--------------
src/backend/access/common/tupdesc.c | 3 +--
src/backend/catalog/aclchk.c | 13 +++++++++++++
src/backend/catalog/objectaddress.c | 3 +--
src/backend/catalog/pg_aggregate.c | 9 +++------
src/backend/commands/functioncmds.c | 12 ++++--------
src/backend/commands/opclasscmds.c | 6 ++----
src/backend/commands/operatorcmds.c | 9 +++------
src/backend/commands/tablecmds.c | 9 +++------
src/backend/commands/typecmds.c | 18 ++++++------------
src/include/utils/acl.h | 2 ++
src/test/regress/expected/privileges.out | 2 +-
11 files changed, 39 insertions(+), 47 deletions(-)