Home Explore Blog CI



postgresql

doc/src/sgml/ref/drop_group.sgml
0aaea9195dc726c30d7b09fe4332a6a2e752be4bbac9cdb20000000300000448
<!--
doc/src/sgml/ref/drop_group.sgml
PostgreSQL documentation
-->

<refentry id="sql-dropgroup">
 <indexterm zone="sql-dropgroup">
  <primary>DROP GROUP</primary>
 </indexterm>

 <refmeta>
  <refentrytitle>DROP GROUP</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>DROP GROUP</refname>
  <refpurpose>remove a database role</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
<synopsis>
DROP GROUP [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ...]
</synopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

  <para>
   <command>DROP GROUP</command> is now an alias for
   <link linkend="sql-droprole"><command>DROP ROLE</command></link>.
  </para>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>

  <para>
   There is no <command>DROP GROUP</command> statement in the SQL standard.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-droprole"/></member>
  </simplelist>
 </refsect1>

</refentry>

Chunks
63a6d260 (1st chunk of `doc/src/sgml/ref/drop_group.sgml`)
Title: DROP GROUP
Summary
The SQL command `DROP GROUP` is used to remove a database role from a PostgreSQL database. It functions identically to the `DROP ROLE` command and is, in fact, now simply an alias for `DROP ROLE`. This means that any operation that can be performed with `DROP ROLE` can also be accomplished using `DROP GROUP`. The syntax for the command includes an optional `IF EXISTS` clause which, when used, prevents an error from being raised if the specified group does not exist. Without this clause, attempting to drop a non-existent group will result in an error. The command takes one or more group names as parameters, allowing multiple groups to be dropped in a single statement. It's important to note that the `DROP GROUP` command is not part of the SQL standard. For more information, refer to the documentation for `DROP ROLE`.