From daea4d8eaee010f41e46bb98cd1b2da2f9fb75d9 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Sat, 19 Nov 2005 17:39:45 +0000 Subject: DROP objecttype IF EXISTS for the following objects: table view index sequence schema type domain conversion --- doc/src/sgml/ref/drop_conversion.sgml | 14 ++++++++++++-- doc/src/sgml/ref/drop_domain.sgml | 18 +++++++++++++++--- doc/src/sgml/ref/drop_index.sgml | 14 ++++++++++++-- doc/src/sgml/ref/drop_schema.sgml | 18 +++++++++++++++--- doc/src/sgml/ref/drop_sequence.sgml | 18 +++++++++++++++--- doc/src/sgml/ref/drop_table.sgml | 18 +++++++++++++++--- doc/src/sgml/ref/drop_type.sgml | 18 +++++++++++++++--- doc/src/sgml/ref/drop_view.sgml | 18 +++++++++++++++--- 8 files changed, 114 insertions(+), 22 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/drop_conversion.sgml b/doc/src/sgml/ref/drop_conversion.sgml index 52d332e42e2..185290cfb2d 100644 --- a/doc/src/sgml/ref/drop_conversion.sgml +++ b/doc/src/sgml/ref/drop_conversion.sgml @@ -1,4 +1,4 @@ - + @@ -17,7 +17,7 @@ -DROP CONVERSION name [ CASCADE | RESTRICT ] +DROP CONVERSION [ IF EXISTS ] name [ CASCADE | RESTRICT ] @@ -34,6 +34,16 @@ DROP CONVERSION name [ CASCADE | RESTRICT ] Parameters + + IF EXISTS + + + Do not throw an error if the conversion does not exist. + A notice is issued in this case. + + + + name diff --git a/doc/src/sgml/ref/drop_domain.sgml b/doc/src/sgml/ref/drop_domain.sgml index 9a2eb781f1b..09f63873fdd 100644 --- a/doc/src/sgml/ref/drop_domain.sgml +++ b/doc/src/sgml/ref/drop_domain.sgml @@ -1,5 +1,5 @@ @@ -20,7 +20,7 @@ PostgreSQL documentation -DROP DOMAIN name [, ...] [ CASCADE | RESTRICT ] +DROP DOMAIN [IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] @@ -37,6 +37,16 @@ DROP DOMAIN name [, ...] [ CASCADE Parameters + + IF EXISTS + + + Do not throw an error if the domain does not exist. A notice is issued + in this case. + + + + name @@ -84,7 +94,9 @@ DROP DOMAIN box; Compatibility - This command conforms to the SQL standard. + This command conforms to the SQL standard, except for the + IF EXISTS option, which is a PostgreSQL + extension. diff --git a/doc/src/sgml/ref/drop_index.sgml b/doc/src/sgml/ref/drop_index.sgml index 2fb009eff1e..17ba565c648 100644 --- a/doc/src/sgml/ref/drop_index.sgml +++ b/doc/src/sgml/ref/drop_index.sgml @@ -1,5 +1,5 @@ @@ -20,7 +20,7 @@ PostgreSQL documentation -DROP INDEX name [, ...] [ CASCADE | RESTRICT ] +DROP INDEX [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] @@ -38,6 +38,16 @@ DROP INDEX name [, ...] [ CASCADE | Parameters + + IF EXISTS + + + Do not throw an error if the index does not exist. A notice is issued + in this case. + + + + name diff --git a/doc/src/sgml/ref/drop_schema.sgml b/doc/src/sgml/ref/drop_schema.sgml index f36b3794d23..34deba02a75 100644 --- a/doc/src/sgml/ref/drop_schema.sgml +++ b/doc/src/sgml/ref/drop_schema.sgml @@ -1,5 +1,5 @@ @@ -20,7 +20,7 @@ PostgreSQL documentation -DROP SCHEMA name [, ...] [ CASCADE | RESTRICT ] +DROP SCHEMA [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] @@ -42,6 +42,16 @@ DROP SCHEMA name [, ...] [ CASCADE Parameters + + IF EXISTS + + + Do not throw an error if the schema does not exist. A notice is issued + in this case. + + + + name @@ -92,7 +102,9 @@ DROP SCHEMA mystuff CASCADE; DROP SCHEMA is fully conforming with the SQL standard, except that the standard only allows one schema to be - dropped per command. + dropped per command, and apart from the + IF EXISTS option, which is a PostgreSQL + extension. diff --git a/doc/src/sgml/ref/drop_sequence.sgml b/doc/src/sgml/ref/drop_sequence.sgml index 11f60b268a8..074f4e7216d 100644 --- a/doc/src/sgml/ref/drop_sequence.sgml +++ b/doc/src/sgml/ref/drop_sequence.sgml @@ -1,5 +1,5 @@ @@ -20,7 +20,7 @@ PostgreSQL documentation -DROP SEQUENCE name [, ...] [ CASCADE | RESTRICT ] +DROP SEQUENCE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] @@ -36,6 +36,16 @@ DROP SEQUENCE name [, ...] [ CASCAD Parameters + + IF EXISTS + + + Do not throw an error if the sequence does not exist. A notice is issued + in this case. + + + + name @@ -84,7 +94,9 @@ DROP SEQUENCE serial; DROP SEQUENCE conforms to the SQL standard, except that the standard only allows one - sequence to be dropped per command. + sequence to be dropped per command, and apart from the + IF EXISTS option, which is a PostgreSQL + extension. diff --git a/doc/src/sgml/ref/drop_table.sgml b/doc/src/sgml/ref/drop_table.sgml index 40cc8167ef9..8e7cedd71d5 100644 --- a/doc/src/sgml/ref/drop_table.sgml +++ b/doc/src/sgml/ref/drop_table.sgml @@ -1,5 +1,5 @@ @@ -20,7 +20,7 @@ PostgreSQL documentation -DROP TABLE name [, ...] [ CASCADE | RESTRICT ] +DROP TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] @@ -48,6 +48,16 @@ DROP TABLE name [, ...] [ CASCADE | Parameters + + IF EXISTS + + + Do not throw an error if the table does not exist. A notice is issued + in this case. + + + + name @@ -97,7 +107,9 @@ DROP TABLE films, distributors; This command conforms to the SQL standard, except that the standard only - allows one table to be dropped per command. + allows one table to be dropped per command, and apart from the + IF EXISTS option, which is a PostgreSQL + extension. diff --git a/doc/src/sgml/ref/drop_type.sgml b/doc/src/sgml/ref/drop_type.sgml index da0f6bc8b63..3f233a56c5b 100644 --- a/doc/src/sgml/ref/drop_type.sgml +++ b/doc/src/sgml/ref/drop_type.sgml @@ -1,5 +1,5 @@ @@ -20,7 +20,7 @@ PostgreSQL documentation -DROP TYPE name [, ...] [ CASCADE | RESTRICT ] +DROP TYPE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] @@ -37,6 +37,16 @@ DROP TYPE name [, ...] [ CASCADE | Parameters + + IF EXISTS + + + Do not throw an error if the type does not exist. A notice is issued + in this case. + + + + name @@ -84,7 +94,9 @@ DROP TYPE box; This command is similar to the corresponding command in the SQL - standard, but note that the CREATE TYPE command + standard, aapart from the IF EXISTS + option, which is a PostgreSQL extension. + But note that the CREATE TYPE command and the data type extension mechanisms in PostgreSQL differ from the SQL standard. diff --git a/doc/src/sgml/ref/drop_view.sgml b/doc/src/sgml/ref/drop_view.sgml index ee28e0ef5e7..45a612114a4 100644 --- a/doc/src/sgml/ref/drop_view.sgml +++ b/doc/src/sgml/ref/drop_view.sgml @@ -1,5 +1,5 @@ @@ -20,7 +20,7 @@ PostgreSQL documentation -DROP VIEW name [, ...] [ CASCADE | RESTRICT ] +DROP VIEW [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] @@ -37,6 +37,16 @@ DROP VIEW name [, ...] [ CASCADE | Parameters + + IF EXISTS + + + Do not throw an error if the view does not exist. A notice is issued + in this case. + + + + name @@ -84,7 +94,9 @@ DROP VIEW kinds; This command conforms to the SQL standard, except that the standard only - allows one view to be dropped per command. + allows one view to be dropped per command, and apart from the + IF EXISTS option, which is a PostgreSQL + extension. -- cgit v1.2.3