4 DROP OWNED — remove database objects owned by a database role
8 DROP OWNED BY { name | CURRENT_ROLE | CURRENT_USER | SESSION_USER } [, ...] [ CA
13 DROP OWNED drops all the objects within the current database that are
14 owned by one of the specified roles. Any privileges granted to the
15 given roles on objects in the current database or on shared objects
16 (databases, tablespaces, configuration parameters) will also be
22 The name of a role whose objects will be dropped, and whose
23 privileges will be revoked.
26 Automatically drop objects that depend on the affected objects,
27 and in turn all objects that depend on those objects (see
31 Refuse to drop the objects owned by a role if any other database
32 objects depend on one of the affected objects. This is the
37 DROP OWNED is often used to prepare for the removal of one or more
38 roles. Because DROP OWNED only affects the objects in the current
39 database, it is usually necessary to execute this command in each
40 database that contains objects owned by a role that is to be removed.
42 Using the CASCADE option might make the command recurse to objects
45 The REASSIGN OWNED command is an alternative that reassigns the
46 ownership of all the database objects owned by one or more roles.
47 However, REASSIGN OWNED does not deal with privileges for other
50 Databases and tablespaces owned by the role(s) will not be removed.
52 See Section 21.4 for more discussion.
56 The DROP OWNED command is a PostgreSQL extension.
60 REASSIGN OWNED, DROP ROLE