mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Add a role property 'rolinherit' which, when false, denotes that the role
doesn't automatically inherit the privileges of roles it is a member of; for such a role, membership in another role can be exploited only by doing explicit SET ROLE. The default inherit setting is TRUE, so by default the behavior doesn't change, but creating a user with NOINHERIT gives closer adherence to our current reading of SQL99. Documentation still lacking, and I think the information schema needs another look.
This commit is contained in:
@@ -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.285 2005/06/28 19:51:24 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.286 2005/07/26 16:38:28 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1139,11 +1139,24 @@ typedef struct DropPLangStmt
|
||||
|
||||
/* ----------------------
|
||||
* Create/Alter/Drop Role Statements
|
||||
*
|
||||
* Note: these node types are also used for the backwards-compatible
|
||||
* Create/Alter/Drop User/Group statements. In the ALTER and DROP cases
|
||||
* there's really no need to distinguish what the original spelling was,
|
||||
* but for CREATE we mark the type because the defaults vary.
|
||||
* ----------------------
|
||||
*/
|
||||
typedef enum RoleStmtType
|
||||
{
|
||||
ROLESTMT_ROLE,
|
||||
ROLESTMT_USER,
|
||||
ROLESTMT_GROUP
|
||||
} RoleStmtType;
|
||||
|
||||
typedef struct CreateRoleStmt
|
||||
{
|
||||
NodeTag type;
|
||||
RoleStmtType stmt_type; /* ROLE/USER/GROUP */
|
||||
char *role; /* role name */
|
||||
List *options; /* List of DefElem nodes */
|
||||
} CreateRoleStmt;
|
||||
|
||||
Reference in New Issue
Block a user