1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Some small polishing of Mark Hollomon's cleanup of DROP command: might

as well allow DROP multiple INDEX, RULE, TYPE as well.  Add missing
CommandCounterIncrement to DROP loop, which could cause trouble otherwise
with multiple DROP of items affecting same catalog entries.  Try to
bring a little consistency to various error messages using 'does not exist',
'nonexistent', etc --- I standardized on 'does not exist' since that's
what the vast majority of the existing uses seem to be.
This commit is contained in:
Tom Lane
2000-10-22 23:32:48 +00:00
parent ee28d8b3d5
commit 9ace03183c
18 changed files with 131 additions and 169 deletions

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_index.sgml,v 1.7 1999/07/22 15:09:10 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_index.sgml,v 1.8 2000/10/22 23:32:38 tgl Exp $
Postgres documentation
-->
@ -15,7 +15,7 @@ Postgres documentation
DROP INDEX
</refname>
<refpurpose>
Removes an index from a database
Removes existing indexes from a database
</refpurpose>
</refnamediv>
<refsynopsisdiv>
@ -23,7 +23,7 @@ Postgres documentation
<date>1999-07-20</date>
</refsynopsisdivinfo>
<synopsis>
DROP INDEX <replaceable class="PARAMETER">index_name</replaceable>
DROP INDEX <replaceable class="PARAMETER">index_name</replaceable> [, ...]
</synopsis>
<refsect2 id="R2-SQL-DROPINDEX-1">
@ -39,7 +39,7 @@ DROP INDEX <replaceable class="PARAMETER">index_name</replaceable>
<term><replaceable class="PARAMETER">index_name</replaceable></term>
<listitem>
<para>
The name of the index to remove.
The name of an index to remove.
</para>
</listitem>
</varlistentry>
@ -62,13 +62,13 @@ DROP
</computeroutput></term>
<listitem>
<para>
The message returned if the index is successfully dropped.
The message returned if the command completes successfully.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: index "<replaceable class="PARAMETER">index_name</replaceable>" nonexistent
ERROR: index "<replaceable class="PARAMETER">index_name</replaceable>" does not exist
</computeroutput></term>
<listitem>
<para>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.7 2000/10/05 19:48:18 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.8 2000/10/22 23:32:38 tgl Exp $
Postgres documentation
-->
@ -15,7 +15,7 @@ Postgres documentation
DROP RULE
</refname>
<refpurpose>
Removes an existing rule from the database
Removes existing rules from the database
</refpurpose>
</refnamediv>
<refsynopsisdiv>
@ -23,7 +23,7 @@ Postgres documentation
<date>1998-09-22</date>
</refsynopsisdivinfo>
<synopsis>
DROP RULE <replaceable class="PARAMETER">name</replaceable>
DROP RULE <replaceable class="PARAMETER">name</replaceable> [, ...]
</synopsis>
<refsect2 id="R2-SQL-DROPRULE-1">
@ -68,7 +68,7 @@ DROP
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: RewriteGetRuleEventRel: rule "<replaceable class="parameter">name</replaceable>" not found
ERROR: Rule or view "<replaceable class="parameter">name</replaceable>" not found
</computeroutput></term>
<listitem>
<para>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.7 2000/05/18 14:24:33 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.8 2000/10/22 23:32:38 tgl Exp $
Postgres documentation
-->
@ -15,7 +15,7 @@ Postgres documentation
DROP SEQUENCE
</refname>
<refpurpose>
Removes an existing sequence
Removes existing sequences from a database
</refpurpose>
</refnamediv>
<refsynopsisdiv>
@ -69,7 +69,7 @@ DROP
</varlistentry>
<varlistentry>
<term><computeroutput>
NOTICE: Relation "<replaceable class="parameter">name</replaceable>" does not exist.
ERROR: sequence "<replaceable class="parameter">name</replaceable>" does not exist
</computeroutput></term>
<listitem>
<para>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_table.sgml,v 1.8 2000/10/18 16:16:03 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_table.sgml,v 1.9 2000/10/22 23:32:38 tgl Exp $
Postgres documentation
-->
@ -68,7 +68,7 @@ DROP
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: table "<replaceable class="parameter">name</replaceable>" is nonexistent
ERROR: table "<replaceable class="parameter">name</replaceable>" does not exist
</computeroutput></term>
<listitem>
<para>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.7 2000/07/22 04:30:27 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.8 2000/10/22 23:32:38 tgl Exp $
Postgres documentation
-->
@ -15,7 +15,7 @@ Postgres documentation
DROP TYPE
</refname>
<refpurpose>
Removes a user-defined type from the system catalogs
Removes user-defined types from the system catalogs
</refpurpose>
</refnamediv>
<refsynopsisdiv>
@ -23,7 +23,7 @@ Postgres documentation
<date>1999-07-20</date>
</refsynopsisdivinfo>
<synopsis>
DROP TYPE <replaceable class="PARAMETER">typename</replaceable>
DROP TYPE <replaceable class="PARAMETER">typename</replaceable> [, ...]
</synopsis>
<refsect2 id="R2-SQL-DROPTYPE-1">

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_view.sgml,v 1.7 2000/10/18 16:16:03 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_view.sgml,v 1.8 2000/10/22 23:32:38 tgl Exp $
Postgres documentation
-->
@ -15,7 +15,7 @@ Postgres documentation
DROP VIEW
</refname>
<refpurpose>
Removes an existing view from a database
Removes existing views from a database
</refpurpose>
</refnamediv>
<refsynopsisdiv>
@ -70,7 +70,7 @@ DROP
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: view <replaceable class="parameter">name</replaceable> is nonexistent
ERROR: view <replaceable class="parameter">name</replaceable> does not exist
</computeroutput></term>
<listitem>
<para>
@ -104,10 +104,6 @@ ERROR: view <replaceable class="parameter">name</replaceable> is nonexistent
<title>
Notes
</title>
<para>
The <productname>Postgres</productname>
<command>DROP TABLE</command> statement also drops views.
</para>
<para>
Refer to <command>CREATE VIEW</command>
for information on how to create views.