diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2005-11-21 12:49:33 +0000 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2005-11-21 12:49:33 +0000 |
commit | cec3b0a9e63fd94b05dac894cca8bfa51358afec (patch) | |
tree | 464377c39a1b3f42b4d2ab82a261e9a603fa1220 /src/backend/commands/tablecmds.c | |
parent | c52795d18a698d25b9cd7cd1ca9318a42b08fdb9 (diff) | |
download | postgresql-cec3b0a9e63fd94b05dac894cca8bfa51358afec.tar.gz postgresql-cec3b0a9e63fd94b05dac894cca8bfa51358afec.zip |
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.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index abec1a835d1..09161e0d4b9 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.174 2005/10/15 02:49:15 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.175 2005/11/21 12:49:31 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -236,7 +236,6 @@ static void ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, const char *colName, TypeName *typename); static void ATPostAlterTypeCleanup(List **wqueue, AlteredTableInfo *tab); static void ATPostAlterTypeParse(char *cmd, List **wqueue); -static void ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing); static void change_owner_recurse_to_sequences(Oid relationOid, Oid newOwnerId); static void ATExecClusterOn(Relation rel, const char *indexName); @@ -5264,7 +5263,7 @@ ATPostAlterTypeParse(char *cmd, List **wqueue) * checks (this is necessary not just an optimization, else we'd fail to * handle toast tables properly). */ -static void +void ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing) { Relation target_rel; |