From e287fb27a5d2419286cd90cd7ddc1a077325d93f Mon Sep 17 00:00:00 2001 From: Andrew Dunstan <andrew@dunslane.net> Date: Fri, 16 Jun 2006 22:27:55 +0000 Subject: [PATCH] docs for DROP ... IF EXISTS for the following cases: language, tablespace, trigger, rule, opclass, function, aggregate. operator, and cast. --- doc/src/sgml/ref/drop_aggregate.sgml | 15 +++++++++++++-- doc/src/sgml/ref/drop_cast.sgml | 15 +++++++++++++-- doc/src/sgml/ref/drop_function.sgml | 16 +++++++++++++--- doc/src/sgml/ref/drop_language.sgml | 15 +++++++++++++-- doc/src/sgml/ref/drop_opclass.sgml | 15 +++++++++++++-- doc/src/sgml/ref/drop_operator.sgml | 15 +++++++++++++-- doc/src/sgml/ref/drop_rule.sgml | 15 +++++++++++++-- doc/src/sgml/ref/drop_tablespace.sgml | 15 +++++++++++++-- doc/src/sgml/ref/drop_trigger.sgml | 15 +++++++++++++-- 9 files changed, 117 insertions(+), 19 deletions(-) diff --git a/doc/src/sgml/ref/drop_aggregate.sgml b/doc/src/sgml/ref/drop_aggregate.sgml index 407f63764f2..e6d03e0bdab 100644 --- a/doc/src/sgml/ref/drop_aggregate.sgml +++ b/doc/src/sgml/ref/drop_aggregate.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.27 2003/11/29 19:51:38 pgsql Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.28 2006/06/16 22:27:55 adunstan Exp $ PostgreSQL documentation --> @@ -20,7 +20,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -DROP AGGREGATE <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">type</replaceable> ) [ CASCADE | RESTRICT ] +DROP AGGREGATE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">type</replaceable> ) [ CASCADE | RESTRICT ] </synopsis> </refsynopsisdiv> @@ -38,6 +38,17 @@ DROP AGGREGATE <replaceable class="PARAMETER">name</replaceable> ( <replaceable <title>Parameters</title> <variablelist> + + <varlistentry> + <term><literal>IF EXISTS</literal></term> + <listitem> + <para> + Do not throw an error if the aggregate does not exist. A notice is issued + in this case. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><replaceable class="parameter">name</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/drop_cast.sgml b/doc/src/sgml/ref/drop_cast.sgml index 4b193cd864e..44363b8ae69 100644 --- a/doc/src/sgml/ref/drop_cast.sgml +++ b/doc/src/sgml/ref/drop_cast.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.6 2003/11/29 19:51:38 pgsql Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.7 2006/06/16 22:27:55 adunstan Exp $ --> <refentry id="SQL-DROPCAST"> <refmeta> @@ -17,7 +17,7 @@ <refsynopsisdiv> <synopsis> -DROP CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>) [ CASCADE | RESTRICT ] +DROP CAST [ IF EXISTS ] (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>) [ CASCADE | RESTRICT ] </synopsis> </refsynopsisdiv> @@ -39,6 +39,17 @@ DROP CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</rep <title>Parameters</title> <variablelist> + + <varlistentry> + <term><literal>IF EXISTS</literal></term> + <listitem> + <para> + Do not throw an error if the cast does not exist. A notice is issued + in this case. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><replaceable>sourcetype</replaceable></term> diff --git a/doc/src/sgml/ref/drop_function.sgml b/doc/src/sgml/ref/drop_function.sgml index 85290acff08..546283b54ca 100644 --- a/doc/src/sgml/ref/drop_function.sgml +++ b/doc/src/sgml/ref/drop_function.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/drop_function.sgml,v 1.30 2005/05/26 20:05:03 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/drop_function.sgml,v 1.31 2006/06/16 22:27:55 adunstan Exp $ PostgreSQL documentation --> @@ -20,7 +20,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -DROP FUNCTION <replaceable class="parameter">name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) +DROP FUNCTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) [ CASCADE | RESTRICT ] </synopsis> </refsynopsisdiv> @@ -41,7 +41,17 @@ DROP FUNCTION <replaceable class="parameter">name</replaceable> ( [ [ <replaceab <title>Parameters</title> <variablelist> - <varlistentry> + <varlistentry> + <term><literal>IF EXISTS</literal></term> + <listitem> + <para> + Do not throw an error if the function does not exist. A notice is issued + in this case. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><replaceable class="parameter">name</replaceable></term> <listitem> <para> diff --git a/doc/src/sgml/ref/drop_language.sgml b/doc/src/sgml/ref/drop_language.sgml index 1f44cf11f49..d565df39759 100644 --- a/doc/src/sgml/ref/drop_language.sgml +++ b/doc/src/sgml/ref/drop_language.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/drop_language.sgml,v 1.21 2003/11/29 19:51:38 pgsql Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/drop_language.sgml,v 1.22 2006/06/16 22:27:55 adunstan Exp $ PostgreSQL documentation --> @@ -20,7 +20,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -DROP [ PROCEDURAL ] LANGUAGE <replaceable class="PARAMETER">name</replaceable> [ CASCADE | RESTRICT ] +DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> [ CASCADE | RESTRICT ] </synopsis> </refsynopsisdiv> @@ -38,6 +38,17 @@ DROP [ PROCEDURAL ] LANGUAGE <replaceable class="PARAMETER">name</replaceable> [ <title>Parameters</title> <variablelist> + + <varlistentry> + <term><literal>IF EXISTS</literal></term> + <listitem> + <para> + Do not throw an error if the function does not exist. A notice is issued + in this case. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><replaceable class="PARAMETER">name</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/drop_opclass.sgml b/doc/src/sgml/ref/drop_opclass.sgml index c06de89fd86..c37c9024367 100644 --- a/doc/src/sgml/ref/drop_opclass.sgml +++ b/doc/src/sgml/ref/drop_opclass.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/drop_opclass.sgml,v 1.8 2003/11/29 19:51:38 pgsql Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/drop_opclass.sgml,v 1.9 2006/06/16 22:27:55 adunstan Exp $ PostgreSQL documentation --> @@ -20,7 +20,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -DROP OPERATOR CLASS <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">index_method</replaceable> [ CASCADE | RESTRICT ] +DROP OPERATOR CLASS [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">index_method</replaceable> [ CASCADE | RESTRICT ] </synopsis> </refsynopsisdiv> @@ -37,6 +37,17 @@ DROP OPERATOR CLASS <replaceable class="PARAMETER">name</replaceable> USING <rep <title>Parameters</title> <variablelist> + + <varlistentry> + <term><literal>IF EXISTS</literal></term> + <listitem> + <para> + Do not throw an error if the operator class does not exist. A notice is issued + in this case. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><replaceable class="parameter">name</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/drop_operator.sgml b/doc/src/sgml/ref/drop_operator.sgml index b928e721936..43529ff179f 100644 --- a/doc/src/sgml/ref/drop_operator.sgml +++ b/doc/src/sgml/ref/drop_operator.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.25 2004/06/25 21:55:50 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.26 2006/06/16 22:27:55 adunstan Exp $ PostgreSQL documentation --> @@ -20,7 +20,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -DROP OPERATOR <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">lefttype</replaceable> | NONE } , { <replaceable class="PARAMETER">righttype</replaceable> | NONE } ) [ CASCADE | RESTRICT ] +DROP OPERATOR [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">lefttype</replaceable> | NONE } , { <replaceable class="PARAMETER">righttype</replaceable> | NONE } ) [ CASCADE | RESTRICT ] </synopsis> </refsynopsisdiv> @@ -38,6 +38,17 @@ DROP OPERATOR <replaceable class="PARAMETER">name</replaceable> ( { <replaceable <title>Parameters</title> <variablelist> + + <varlistentry> + <term><literal>IF EXISTS</literal></term> + <listitem> + <para> + Do not throw an error if the operator does not exist. A notice is issued + in this case. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><replaceable class="parameter">name</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/drop_rule.sgml b/doc/src/sgml/ref/drop_rule.sgml index b139009d48f..68331b60639 100644 --- a/doc/src/sgml/ref/drop_rule.sgml +++ b/doc/src/sgml/ref/drop_rule.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.20 2003/11/29 19:51:38 pgsql Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.21 2006/06/16 22:27:55 adunstan Exp $ PostgreSQL documentation --> @@ -20,7 +20,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -DROP RULE <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">relation</replaceable> [ CASCADE | RESTRICT ] +DROP RULE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">relation</replaceable> [ CASCADE | RESTRICT ] </synopsis> </refsynopsisdiv> @@ -36,6 +36,17 @@ DROP RULE <replaceable class="PARAMETER">name</replaceable> ON <replaceable clas <title>Parameters</title> <variablelist> + + <varlistentry> + <term><literal>IF EXISTS</literal></term> + <listitem> + <para> + Do not throw an error if the rule does not exist. A notice is issued + in this case. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><replaceable class="parameter">name</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/drop_tablespace.sgml b/doc/src/sgml/ref/drop_tablespace.sgml index bd4fb6dcd5e..7e5d018238a 100644 --- a/doc/src/sgml/ref/drop_tablespace.sgml +++ b/doc/src/sgml/ref/drop_tablespace.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/drop_tablespace.sgml,v 1.2 2004/06/25 21:55:50 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/drop_tablespace.sgml,v 1.3 2006/06/16 22:27:55 adunstan Exp $ PostgreSQL documentation --> @@ -20,7 +20,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -DROP TABLESPACE <replaceable class="PARAMETER">tablespacename</replaceable> +DROP TABLESPACE [ IF EXISTS ] <replaceable class="PARAMETER">tablespacename</replaceable> </synopsis> </refsynopsisdiv> @@ -44,6 +44,17 @@ DROP TABLESPACE <replaceable class="PARAMETER">tablespacename</replaceable> <title>Parameters</title> <variablelist> + + <varlistentry> + <term><literal>IF EXISTS</literal></term> + <listitem> + <para> + Do not throw an error if the tablespace does not exist. A notice is issued + in this case. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><replaceable class="PARAMETER">tablespacename</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/drop_trigger.sgml b/doc/src/sgml/ref/drop_trigger.sgml index bfcad66ae8f..4c45e76f811 100644 --- a/doc/src/sgml/ref/drop_trigger.sgml +++ b/doc/src/sgml/ref/drop_trigger.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/drop_trigger.sgml,v 1.19 2004/09/20 00:04:19 neilc Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/drop_trigger.sgml,v 1.20 2006/06/16 22:27:55 adunstan Exp $ PostgreSQL documentation --> @@ -20,7 +20,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -DROP TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table</replaceable> [ CASCADE | RESTRICT ] +DROP TRIGGER [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table</replaceable> [ CASCADE | RESTRICT ] </synopsis> </refsynopsisdiv> @@ -38,6 +38,17 @@ DROP TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable c <title>Parameters</title> <variablelist> + + <varlistentry> + <term><literal>IF EXISTS</literal></term> + <listitem> + <para> + Do not throw an error if the trigger does not exist. A notice is issued + in this case. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><replaceable class="PARAMETER">name</replaceable></term> <listitem> -- GitLab