Repository: incubator-hawq
Updated Branches:
  refs/heads/master 7f3658d3a -> a5e72f4cc


HAWQ-1076. Fixed USAGE privilege bug on nextval(sequence) when optimizer on


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/a5e72f4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/a5e72f4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/a5e72f4c

Branch: refs/heads/master
Commit: a5e72f4cc3487a5dd0746da10a3d2711d62a144f
Parents: 7f3658d
Author: stanlyxiang <stanly.sxi...@gmail.com>
Authored: Fri Oct 14 11:59:19 2016 +0800
Committer: stanlyxiang <stanly.sxi...@gmail.com>
Committed: Fri Oct 14 12:01:23 2016 +0800

----------------------------------------------------------------------
 src/backend/commands/sequence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a5e72f4c/src/backend/commands/sequence.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 1cc12a9..f1259d6 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -842,7 +842,7 @@ nextval_internal(Oid relid)
                return elm->last;
        }
 
-       if (pg_class_aclcheck(elm->relid, GetUserId(), ACL_UPDATE) != 
ACLCHECK_OK)
+       if (pg_class_aclcheck(elm->relid, GetUserId(), ACL_USAGE | ACL_UPDATE) 
!= ACLCHECK_OK)
                ereport(ERROR,
                                (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
                                 errmsg("permission denied for sequence %s",

Reply via email to