1DROP OWNED(7)                    SQL Commands                    DROP OWNED(7)
2
3
4

NAME

6       DROP OWNED - remove database objects owned by a database role
7
8

SYNOPSIS

10       DROP OWNED BY name [, ...] [ CASCADE | RESTRICT ]
11
12

DESCRIPTION

14       DROP OWNED drops all the objects in the current database that are owned
15       by one of the specified roles. Any  privileges  granted  to  the  given
16       roles on objects in the current database will also be revoked.
17

PARAMETERS

19       name   The  name  of  a  role  whose objects will be dropped, and whose
20              privileges will be revoked.
21
22       CASCADE
23              Automatically drop objects that depend on the affected objects.
24
25       RESTRICT
26              Refuse to drop the objects owned by a role if any other database
27              objects  depend  on  one  of  the  affected objects. This is the
28              default.
29

NOTES

31       DROP OWNED is often used to prepare for the  removal  of  one  or  more
32       roles. Because DROP OWNED only affects the objects in the current data‐
33       base, it is usually necessary to execute this command in each  database
34       that contains objects owned by a role that is to be removed.
35
36       Using  the  CASCADE  option  might  make the command recurse to objects
37       owned by other users.
38
39       The REASSIGN OWNED [reassign_owned(7)] command is an  alternative  that
40       reassigns  the  ownership  of  all the database objects owned by one or
41       more roles.
42

COMPATIBILITY

44       The DROP OWNED statement is a PostgreSQL extension.
45

SEE ALSO

47       REASSIGN OWNED [reassign_owned(7)], DROP ROLE [drop_role(7)]
48
49
50
51SQL - Language Statements         2011-09-22                     DROP OWNED(7)
Impressum