diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-28 19:51:26 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-28 19:51:26 +0000 |
commit | 0eaa36a16a89029f1b2eb9a38c90e3a0a0e2641e (patch) | |
tree | 31ad7be7a83a1fa7186e8de04c317f011ef4f54e /src/include/nodes/parsenodes.h | |
parent | 88b49cdc95ef9601edcb2cdb3fbe1986128b5092 (diff) | |
download | postgresql-0eaa36a16a89029f1b2eb9a38c90e3a0a0e2641e.tar.gz postgresql-0eaa36a16a89029f1b2eb9a38c90e3a0a0e2641e.zip |
Bring syntax of role-related commands into SQL compliance. To avoid
syntactic conflicts, both privilege and role GRANT/REVOKE commands have
to use the same production for scanning the list of tokens that might
eventually turn out to be privileges or role names. So, change the
existing GRANT/REVOKE code to expect a list of strings not pre-reduced
AclMode values. Fix a couple other minor issues while at it, such as
InitializeAcl function name conflicting with a Windows system function.
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r-- | src/include/nodes/parsenodes.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 64acaa72e57..32f9b03c585 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.284 2005/06/28 05:09:13 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.285 2005/06/28 19:51:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -29,7 +29,7 @@ typedef enum QuerySource /* * Grantable rights are encoded so that we can OR them together in a bitmask. - * The present representation of AclItem limits us to 15 distinct rights, + * The present representation of AclItem limits us to 16 distinct rights, * even though AclMode is defined as uint32. See utils/acl.h. * * Caution: changing these codes breaks stored ACLs, hence forces initdb. @@ -48,7 +48,6 @@ typedef uint32 AclMode; /* a bitmask of privilege bits */ #define ACL_CREATE (1<<9) /* for namespaces and databases */ #define ACL_CREATE_TEMP (1<<10) /* for databases */ #define N_ACL_RIGHTS 11 /* 1 plus the last 1<<x */ -#define ACL_ALL_RIGHTS (-1) /* all-privileges marker in GRANT list */ #define ACL_NO_RIGHTS 0 /* Currently, SELECT ... FOR UPDATE/FOR SHARE requires UPDATE privileges */ #define ACL_SELECT_FOR_UPDATE ACL_UPDATE @@ -886,7 +885,8 @@ typedef struct GrantStmt List *objects; /* list of RangeVar nodes, FuncWithArgs * nodes, or plain names (as Value * strings) */ - List *privileges; /* integer list of privilege codes */ + List *privileges; /* list of privilege names (as Strings) */ + /* privileges == NIL denotes "all privileges" */ List *grantees; /* list of PrivGrantee nodes */ bool grant_option; /* grant or revoke grant option */ DropBehavior behavior; /* drop behavior (for REVOKE) */ |