summaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorPeter Eisentraut2017-10-11 22:35:19 +0000
committerPeter Eisentraut2018-01-19 19:01:14 +0000
commit2c6f37ed62114bd5a092c20fe721bd11b3bcb91e (patch)
tree080292978101fbbd094f886c05b03a94c43c877c /src/include/utils
parent42b5856038a5af6bb4ec3c09b62d9d9a3ab43172 (diff)
Replace GrantObjectType with ObjectType
There used to be a lot of different *Type and *Kind symbol groups to address objects within different commands, most of which have been replaced by ObjectType, starting with b256f2426433c56b4bea3a8102757749885b81ba. But this conversion was never done for the ACL commands until now. This change ends up being just a plain replacement of the types and symbols, without any code restructuring needed, except deleting some now redundant code. Reviewed-by: Michael Paquier <michael.paquier@gmail.com> Reviewed-by: Stephen Frost <sfrost@snowman.net>
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/acl.h6
-rw-r--r--src/include/utils/aclchk_internal.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h
index 67c7b2d4acc..7db1606b8f0 100644
--- a/src/include/utils/acl.h
+++ b/src/include/utils/acl.h
@@ -163,7 +163,7 @@ typedef ArrayType Acl;
#define ACL_ALL_RIGHTS_FUNCTION (ACL_EXECUTE)
#define ACL_ALL_RIGHTS_LANGUAGE (ACL_USAGE)
#define ACL_ALL_RIGHTS_LARGEOBJECT (ACL_SELECT|ACL_UPDATE)
-#define ACL_ALL_RIGHTS_NAMESPACE (ACL_USAGE|ACL_CREATE)
+#define ACL_ALL_RIGHTS_SCHEMA (ACL_USAGE|ACL_CREATE)
#define ACL_ALL_RIGHTS_TABLESPACE (ACL_CREATE)
#define ACL_ALL_RIGHTS_TYPE (ACL_USAGE)
@@ -217,8 +217,8 @@ typedef enum AclObjectKind
/*
* routines used internally
*/
-extern Acl *acldefault(GrantObjectType objtype, Oid ownerId);
-extern Acl *get_user_default_acl(GrantObjectType objtype, Oid ownerId,
+extern Acl *acldefault(ObjectType objtype, Oid ownerId);
+extern Acl *get_user_default_acl(ObjectType objtype, Oid ownerId,
Oid nsp_oid);
extern Acl *aclupdate(const Acl *old_acl, const AclItem *mod_aip,
diff --git a/src/include/utils/aclchk_internal.h b/src/include/utils/aclchk_internal.h
index 1843f50b5a0..f7c44fcd4ba 100644
--- a/src/include/utils/aclchk_internal.h
+++ b/src/include/utils/aclchk_internal.h
@@ -26,12 +26,12 @@
* Note: 'all_privs' and 'privileges' represent object-level privileges only.
* There might also be column-level privilege specifications, which are
* represented in col_privs (this is a list of untransformed AccessPriv nodes).
- * Column privileges are only valid for objtype ACL_OBJECT_RELATION.
+ * Column privileges are only valid for objtype OBJECT_TABLE.
*/
typedef struct
{
bool is_grant;
- GrantObjectType objtype;
+ ObjectType objtype;
List *objects;
bool all_privs;
AclMode privileges;