pgsql: Improve ALTER DOMAIN / DROP CONSTRAINT with nonexistent constrai

Lists: pgsql-committers
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve ALTER DOMAIN / DROP CONSTRAINT with nonexistent constrai
Date: 2012-01-05 17:52:23
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/104e7dac28c56dcaf9b778dff60a5daefc3a0661

Modified Files
--------------
doc/src/sgml/ref/alter_domain.sgml | 6 ++++--
src/backend/commands/typecmds.c | 17 ++++++++++++++++-
src/backend/nodes/copyfuncs.c | 1 +
src/backend/nodes/equalfuncs.c | 1 +
src/backend/parser/gram.y | 12 ++++++++++++
src/backend/tcop/utility.c | 3 ++-
src/include/commands/typecmds.h | 2 +-
src/include/nodes/parsenodes.h | 1 +
src/test/regress/expected/domain.out | 4 ++++
src/test/regress/sql/domain.sql | 3 +++
10 files changed, 45 insertions(+), 5 deletions(-)