DROP OWNED
SQL - Language Statements
DROP OWNED
remove database objects owned by a database role
DROP OWNED
DROP OWNED name [, ...] [ RESTRICT | CASCADE ]
Description
The DROP OWNED instructs the system to drop those
database objects owned by one of the given roles which reside on the
current database. All privileges granted to the given roles will also be
revoked.
If CASCADE> is specified, DROP OWNED
will behave like a DROP ... CASCADE was issued
for each object, that is, objects dependent on the ones owned by the
given users will be dropped as well.
Notes
The DROP OWNED command is mostly used in preparation to
drop the roles. It may be necessary to issue the command in more than one
database.
Using the CASCADE option may make the command recurse to
objects owned by other users.
See the REASSIGN OWNED command for an alternative that
gives the objects away to another role.
Compatibility
The DROP OWNED statement is a
PostgreSQL extension.
See Also