mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Implement DROP OWNED and REASSIGN OWNED. These new commands facilitate the
process of dropping roles by dropping objects owned by them and privileges granted to them, or giving the owned objects to someone else, through the use of the data stored in the new pg_shdepend catalog. Some refactoring of the GRANT/REVOKE code was needed, as well as ALTER OWNER code. Further cleanup of code duplication in the GRANT code seems necessary. Implemented by me after an idea from Tom Lane, who also provided various kind of implementation advice. Regression tests pass. Some tests for the new functionality are also added, as well as rudimentary documentation.
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.293 2005/11/19 17:39:45 adunstan Exp $
|
||||
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.294 2005/11/21 12:49:32 alvherre Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1875,4 +1875,24 @@ typedef struct DeallocateStmt
|
||||
char *name; /* The name of the plan to remove */
|
||||
} DeallocateStmt;
|
||||
|
||||
/*
|
||||
* DROP OWNED statement
|
||||
*/
|
||||
typedef struct DropOwnedStmt
|
||||
{
|
||||
NodeTag type;
|
||||
List *roles;
|
||||
DropBehavior behavior;
|
||||
} DropOwnedStmt;
|
||||
|
||||
/*
|
||||
* REASSIGN OWNED statement
|
||||
*/
|
||||
typedef struct ReassignOwnedStmt
|
||||
{
|
||||
NodeTag type;
|
||||
List *roles;
|
||||
char *newrole;
|
||||
} ReassignOwnedStmt;
|
||||
|
||||
#endif /* PARSENODES_H */
|
||||
|
||||
Reference in New Issue
Block a user