diff options
| author | Peter Eisentraut | 2012-06-15 19:55:03 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2012-06-15 19:55:03 +0000 |
| commit | 15b1918e7d3532f0e4ec3455ae6ce45fae09c86f (patch) | |
| tree | 659b8a57116719720c1b59d7d6ad507d72d3c748 /src/include/utils | |
| parent | d933092e0ab55ed95615977e50963f969ac9793d (diff) | |
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
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/acl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index 6de39b21cf4..2d1cccbf66e 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -302,6 +302,8 @@ extern void aclcheck_error(AclResult aclerr, AclObjectKind objectkind, extern void aclcheck_error_col(AclResult aclerr, AclObjectKind objectkind, const char *objectname, const char *colname); +extern void aclcheck_error_type(AclResult aclerr, Oid typeOid); + /* ownercheck routines just return true (owner) or false (not) */ extern bool pg_class_ownercheck(Oid class_oid, Oid roleid); extern bool pg_type_ownercheck(Oid type_oid, Oid roleid); |
