]> granicus.if.org Git - postgresql/commit
Implement DROP OWNED and REASSIGN OWNED. These new commands facilitate the
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 21 Nov 2005 12:49:33 +0000 (12:49 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 21 Nov 2005 12:49:33 +0000 (12:49 +0000)
commitcec3b0a9e63fd94b05dac894cca8bfa51358afec
tree464377c39a1b3f42b4d2ab82a261e9a603fa1220
parentc52795d18a698d25b9cd7cd1ca9318a42b08fdb9
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.
31 files changed:
doc/src/sgml/ref/allfiles.sgml
doc/src/sgml/ref/drop_owned.sgml [new file with mode: 0644]
doc/src/sgml/ref/reassign_owned.sgml [new file with mode: 0644]
doc/src/sgml/reference.sgml
src/backend/catalog/aclchk.c
src/backend/catalog/pg_depend.c
src/backend/catalog/pg_shdepend.c
src/backend/commands/conversioncmds.c
src/backend/commands/functioncmds.c
src/backend/commands/opclasscmds.c
src/backend/commands/operatorcmds.c
src/backend/commands/schemacmds.c
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/backend/commands/user.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/gram.y
src/backend/parser/keywords.c
src/backend/tcop/utility.c
src/include/catalog/dependency.h
src/include/commands/conversioncmds.h
src/include/commands/defrem.h
src/include/commands/schemacmds.h
src/include/commands/tablecmds.h
src/include/commands/user.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/utils/acl.h
src/test/regress/expected/dependency.out
src/test/regress/sql/dependency.sql