summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorPeter Eisentraut2001-06-09 23:21:55 +0000
committerPeter Eisentraut2001-06-09 23:21:55 +0000
commit7ceed2a9b5f19c59a2797c5aa31d801c32cb0cc4 (patch)
treec7d02530d61fd36d5b2677293fdecba6738cc8e9 /src/include/nodes
parent202548d6cc276e1f2a60b3d7d3d17392b5d9795e (diff)
Allow GRANT/REVOKE to/from more than one user per invocation. Command tag
for GRANT/REVOKE is now just that, not "CHANGE". On the way, migrate some of the aclitem internal representation away from the parser and build a real parse tree instead. Also add some 'const' qualifiers.
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/nodes.h5
-rw-r--r--src/include/nodes/parsenodes.h24
2 files changed, 21 insertions, 8 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 25fe3955e1f..d62583c4d23 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.89 2001/04/24 00:08:38 tgl Exp $
+ * $Id: nodes.h,v 1.90 2001/06/09 23:21:55 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -148,7 +148,7 @@ typedef enum NodeTag
T_SelectStmt,
T_AlterTableStmt,
T_SetOperationStmt,
- T_ChangeACLStmt,
+ T_GrantStmt,
T_ClosePortalStmt,
T_ClusterStmt,
T_CopyStmt,
@@ -224,6 +224,7 @@ typedef enum NodeTag
T_CaseWhen,
T_RowMarkXXX, /* not used anymore; tag# available */
T_FkConstraint,
+ T_PrivGrantee,
/*
* TAGS FOR FUNCTION-CALL CONTEXT AND RESULTINFO NODES (see fmgr.h)
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 31aadb449d5..fe2d1bb7ffe 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.130 2001/06/04 23:27:23 momjian Exp $
+ * $Id: parsenodes.h,v 1.131 2001/06/09 23:21:55 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -137,15 +137,27 @@ typedef struct AlterTableStmt
} AlterTableStmt;
/* ----------------------
- * Change ACL Statement
+ * Grant Statement
* ----------------------
*/
-typedef struct ChangeACLStmt
+
+typedef struct GrantStmt
+{
+ NodeTag type;
+ bool is_grant; /* not revoke */
+ List *relnames;
+ char *privileges;
+ List *grantees;
+} GrantStmt;
+
+
+typedef struct PrivGrantee
{
NodeTag type;
- List *relNames;
- char *aclString;
-} ChangeACLStmt;
+ char *username; /* if both are NULL then PUBLIC */
+ char *groupname;
+} PrivGrantee;
+
/* ----------------------
* Close Portal Statement