mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 16:01:14 +02:00
100 lines
2.5 KiB
Plaintext
100 lines
2.5 KiB
Plaintext
|
<!--
|
||
|
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_owned.sgml,v 1.1 2005/11/21 12:49:30 alvherre Exp $
|
||
|
PostgreSQL documentation
|
||
|
-->
|
||
|
|
||
|
<refentry id="SQL-DROP-OWNED">
|
||
|
<refmeta>
|
||
|
<refentrytitle id="SQL-DROP-OWNED-TITLE">DROP OWNED</refentrytitle>
|
||
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||
|
</refmeta>
|
||
|
|
||
|
<refnamediv>
|
||
|
<refname>DROP OWNED</refname>
|
||
|
<refpurpose>remove database objects owned by a database role</refpurpose>
|
||
|
</refnamediv>
|
||
|
|
||
|
<indexterm zone="sql-drop-owned">
|
||
|
<primary>DROP OWNED</primary>
|
||
|
</indexterm>
|
||
|
|
||
|
<refsynopsisdiv>
|
||
|
<synopsis>
|
||
|
DROP OWNED <replaceable class="PARAMETER">name</replaceable> [, ...] [ RESTRICT | CASCADE ]
|
||
|
</synopsis>
|
||
|
</refsynopsisdiv>
|
||
|
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
|
||
|
<para>
|
||
|
The <command>DROP OWNED</command> 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.
|
||
|
</para>
|
||
|
|
||
|
<para>
|
||
|
If <literal>CASCADE</> is specified, <command>DROP OWNED</command>
|
||
|
will behave like a <command>DROP ... CASCADE</command> was issued
|
||
|
for each object, that is, objects dependent on the ones owned by the
|
||
|
given users will be dropped as well.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1>
|
||
|
<title>Notes</title>
|
||
|
<para>
|
||
|
The <command>DROP OWNED</command> command is mostly used in preparation to
|
||
|
drop the roles. It may be necessary to issue the command in more than one
|
||
|
database.
|
||
|
</para>
|
||
|
|
||
|
<para>
|
||
|
Using the <literal>CASCADE</literal> option may make the command recurse to
|
||
|
objects owned by other users.
|
||
|
</para>
|
||
|
|
||
|
<para>
|
||
|
See the <command>REASSIGN OWNED</command> command for an alternative that
|
||
|
gives the objects away to another role.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1>
|
||
|
<title>Compatibility</title>
|
||
|
|
||
|
<para>
|
||
|
The <command>DROP OWNED</command> statement is a
|
||
|
<productname>PostgreSQL</productname> extension.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1>
|
||
|
<title>See Also</title>
|
||
|
|
||
|
<simplelist type="inline">
|
||
|
<member><xref linkend="sql-reassign-owned" endterm="sql-reassign-owned-title"></member>
|
||
|
<member><xref linkend="sql-droprole" endterm="sql-droprole-title"></member>
|
||
|
</simplelist>
|
||
|
</refsect1>
|
||
|
|
||
|
</refentry>
|
||
|
|
||
|
<!-- Keep this comment at the end of the file
|
||
|
Local variables:
|
||
|
mode: sgml
|
||
|
sgml-omittag:nil
|
||
|
sgml-shorttag:t
|
||
|
sgml-minimize-attributes:nil
|
||
|
sgml-always-quote-attributes:t
|
||
|
sgml-indent-step:1
|
||
|
sgml-indent-data:t
|
||
|
sgml-parent-document:nil
|
||
|
sgml-default-dtd-file:"../reference.ced"
|
||
|
sgml-exposed-tags:nil
|
||
|
sgml-local-catalogs:"/usr/lib/sgml/catalog"
|
||
|
sgml-local-ecat-files:nil
|
||
|
End:
|
||
|
-->
|