From 104e7dac28c56dcaf9b778dff60a5daefc3a0661 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 5 Jan 2012 19:48:55 +0200 Subject: Improve ALTER DOMAIN / DROP CONSTRAINT with nonexistent constraint ALTER DOMAIN / DROP CONSTRAINT on a nonexistent constraint name did not report any error. Now it reports an error. The IF EXISTS option was added to get the usual behavior of ignoring nonexistent objects to drop. --- doc/src/sgml/ref/alter_domain.sgml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/alter_domain.sgml b/doc/src/sgml/ref/alter_domain.sgml index 29504ccd7cb..2511a125d38 100644 --- a/doc/src/sgml/ref/alter_domain.sgml +++ b/doc/src/sgml/ref/alter_domain.sgml @@ -30,7 +30,7 @@ ALTER DOMAIN name ALTER DOMAIN name ADD domain_constraint [ NOT VALID ] ALTER DOMAIN name - DROP CONSTRAINT constraint_name [ RESTRICT | CASCADE ] + DROP CONSTRAINT [ IF EXISTS ] constraint_name [ RESTRICT | CASCADE ] ALTER DOMAIN name VALIDATE CONSTRAINT constraint_name ALTER DOMAIN name @@ -92,10 +92,12 @@ ALTER DOMAIN name - DROP CONSTRAINT + DROP CONSTRAINT [ IF EXISTS ] This form drops constraints on a domain. + If IF EXISTS is specified and the constraint + does not exist, no error is thrown. In this case a notice is issued instead. -- cgit v1.2.3