mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY constraints all have real live entries in pg_constraint. pg_depend exists, and RESTRICT/CASCADE options work on most kinds of DROP; however, pg_depend is not yet very well populated with dependencies. (Most of the ones that are present at this point just replace formerly hardwired associations, such as the implicit drop of a relation's pg_type entry when the relation is dropped.) Need to add more logic to create dependency entries, improve pg_dump to dump constraints in place of indexes and triggers, and add some regression tests.
185 lines
4.1 KiB
Plaintext
185 lines
4.1 KiB
Plaintext
<!--
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_index.sgml,v 1.16 2002/07/12 18:43:13 tgl Exp $
|
|
PostgreSQL documentation
|
|
-->
|
|
|
|
<refentry id="SQL-DROPINDEX">
|
|
<refmeta>
|
|
<refentrytitle id="SQL-DROPINDEX-TITLE">DROP INDEX</refentrytitle>
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
</refmeta>
|
|
<refnamediv>
|
|
<refname>
|
|
DROP INDEX
|
|
</refname>
|
|
<refpurpose>
|
|
remove an index
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsynopsisdiv>
|
|
<refsynopsisdivinfo>
|
|
<date>1999-07-20</date>
|
|
</refsynopsisdivinfo>
|
|
<synopsis>
|
|
DROP INDEX <replaceable class="PARAMETER">index_name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
|
</synopsis>
|
|
|
|
<refsect2 id="R2-SQL-DROPINDEX-1">
|
|
<refsect2info>
|
|
<date>1998-04-15</date>
|
|
</refsect2info>
|
|
<title>
|
|
Inputs
|
|
</title>
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><replaceable class="PARAMETER">index_name</replaceable></term>
|
|
<listitem>
|
|
<para>
|
|
The name (optionally schema-qualified) of an index to remove.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>CASCADE</term>
|
|
<listitem>
|
|
<para>
|
|
Automatically drop objects that depend on the index.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>RESTRICT</term>
|
|
<listitem>
|
|
<para>
|
|
Refuse to drop the index if there are any dependent objects.
|
|
This is the default.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect2>
|
|
|
|
<refsect2 id="R2-SQL-DROPINDEX-2">
|
|
<refsect2info>
|
|
<date>1998-04-15</date>
|
|
</refsect2info>
|
|
<title>
|
|
Outputs
|
|
</title>
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><computeroutput>
|
|
DROP INDEX
|
|
</computeroutput></term>
|
|
<listitem>
|
|
<para>
|
|
The message returned if the command completes successfully.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><computeroutput>
|
|
ERROR: index "<replaceable class="PARAMETER">index_name</replaceable>" does not exist
|
|
</computeroutput></term>
|
|
<listitem>
|
|
<para>
|
|
This message occurs if <replaceable class="PARAMETER">index_name</replaceable>
|
|
is not an index in the database.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect2>
|
|
</refsynopsisdiv>
|
|
|
|
<refsect1 id="R1-SQL-DROPINDEX-1">
|
|
<refsect1info>
|
|
<date>1998-04-15</date>
|
|
</refsect1info>
|
|
<title>
|
|
Description
|
|
</title>
|
|
<para>
|
|
<command>DROP INDEX</command> drops an existing index from the database
|
|
system. To execute this command you must be the owner of
|
|
the index.
|
|
</para>
|
|
|
|
<refsect2 id="R2-SQL-DROPINDEX-3">
|
|
<refsect2info>
|
|
<date>1998-04-15</date>
|
|
</refsect2info>
|
|
<title>
|
|
Notes
|
|
</title>
|
|
<para>
|
|
<command>DROP INDEX</command> is a <productname>PostgreSQL</productname>
|
|
language extension.
|
|
</para>
|
|
<para>
|
|
Refer to
|
|
<xref linkend="sql-createindex" endterm="sql-createindex-title">
|
|
for information on how to create indexes.
|
|
</para>
|
|
</refsect2>
|
|
</refsect1>
|
|
|
|
<refsect1 id="R1-SQL-DROPINDEX-2">
|
|
<title>
|
|
Usage
|
|
</title>
|
|
<para>
|
|
This command will remove the <literal>title_idx</literal> index:
|
|
|
|
<programlisting>
|
|
DROP INDEX title_idx;
|
|
</programlisting>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 id="R1-SQL-DROPINDEX-3">
|
|
<title>
|
|
Compatibility
|
|
</title>
|
|
|
|
<refsect2 id="R2-SQL-DROPINDEX-4">
|
|
<refsect2info>
|
|
<date>1998-04-15</date>
|
|
</refsect2info>
|
|
<title>
|
|
SQL92
|
|
</title>
|
|
<para>
|
|
<acronym>SQL92</acronym> defines commands by which to access
|
|
a generic relational database.
|
|
Indexes are an implementation-dependent feature and hence
|
|
there are no index-specific commands or definitions in the
|
|
<acronym>SQL92</acronym> language.
|
|
</para>
|
|
</refsect2>
|
|
</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:
|
|
-->
|