1999-07-22 17:09:15 +02:00
|
|
|
<!--
|
2003-06-25 01:29:25 +02:00
|
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_index.sgml,v 1.18 2003/06/24 23:29:25 momjian Exp $
|
2001-12-08 04:24:40 +01:00
|
|
|
PostgreSQL documentation
|
1999-07-22 17:09:15 +02:00
|
|
|
-->
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refentry id="SQL-DROPINDEX">
|
|
|
|
<refmeta>
|
2002-04-21 21:02:39 +02:00
|
|
|
<refentrytitle id="SQL-DROPINDEX-TITLE">DROP INDEX</refentrytitle>
|
1999-07-06 19:16:42 +02:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
2003-05-04 04:23:16 +02:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refnamediv>
|
2003-05-04 04:23:16 +02:00
|
|
|
<refname>DROP INDEX</refname>
|
|
|
|
<refpurpose>remove an index</refpurpose>
|
1998-12-29 03:24:47 +01:00
|
|
|
</refnamediv>
|
2003-05-04 04:23:16 +02:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refsynopsisdiv>
|
2003-05-04 04:23:16 +02:00
|
|
|
<synopsis>
|
2003-06-25 01:29:25 +02:00
|
|
|
DROP INDEX <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
2003-05-04 04:23:16 +02:00
|
|
|
</synopsis>
|
1999-07-06 19:16:42 +02:00
|
|
|
</refsynopsisdiv>
|
1998-09-07 17:53:12 +02:00
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<para>
|
1998-09-07 17:53:12 +02:00
|
|
|
<command>DROP INDEX</command> drops an existing index from the database
|
|
|
|
system. To execute this command you must be the owner of
|
|
|
|
the index.
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
2003-05-04 04:23:16 +02:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Parameters</title>
|
1999-07-06 19:16:42 +02:00
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2003-06-25 01:29:25 +02:00
|
|
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
2003-05-04 04:23:16 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name (optionally schema-qualified) of an index to remove.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><literal>CASCADE</literal></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Automatically drop objects that depend on the index.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><literal>RESTRICT</literal></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Refuse to drop the index if any objects depend on it. This is
|
|
|
|
the default.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
1998-12-29 03:24:47 +01:00
|
|
|
</refsect1>
|
1999-07-06 19:16:42 +02:00
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Diagnostics</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><computeroutput>DROP INDEX</computeroutput></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Message returned if the command completes successfully.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2003-06-25 01:29:25 +02:00
|
|
|
<term><computeroutput>ERROR: index "<replaceable class="PARAMETER">name</replaceable>" does not exist</computeroutput></term>
|
2003-05-04 04:23:16 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
This message is returned if <replaceable
|
2003-06-25 01:29:25 +02:00
|
|
|
class="PARAMETER">name</replaceable> is not an existing
|
2003-05-04 04:23:16 +02:00
|
|
|
index.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Examples</title>
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<para>
|
2003-05-04 04:23:16 +02:00
|
|
|
This command will remove the index <literal>title_idx</literal>:
|
1999-07-06 19:16:42 +02:00
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<programlisting>
|
|
|
|
DROP INDEX title_idx;
|
|
|
|
</programlisting>
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Compatibility</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>DROP INDEX</command> is a
|
|
|
|
<productname>PostgreSQL</productname> language extension. There
|
|
|
|
are no provisions for indexes in the SQL standard.
|
|
|
|
</para>
|
1998-09-07 17:53:12 +02:00
|
|
|
</refsect1>
|
2003-05-04 04:23:16 +02:00
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See Also</title>
|
|
|
|
|
|
|
|
<simplelist type="inline">
|
|
|
|
<member><xref linkend="sql-createindex" endterm="sql-createindex-title"></member>
|
|
|
|
</simplelist>
|
|
|
|
</refsect1>
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
</refentry>
|
1998-09-07 17:53:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
1999-07-06 19:16:42 +02:00
|
|
|
sgml-omittag:nil
|
1998-09-07 17:53:12 +02:00
|
|
|
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:
|
|
|
|
-->
|