Improve ALTER DOMAIN / DROP CONSTRAINT with nonexistent constraint
Peter Eisentraut <peter_e@gmx.net>
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.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/alter_domain.sgml | modified | +4 −2 |
| src/backend/commands/typecmds.c | modified | +16 −1 |
| src/backend/nodes/copyfuncs.c | modified | +1 −0 |
| src/backend/nodes/equalfuncs.c | modified | +1 −0 |
| src/backend/parser/gram.y | modified | +12 −0 |
| src/backend/tcop/utility.c | modified | +2 −1 |
| src/include/commands/typecmds.h | modified | +1 −1 |
| src/include/nodes/parsenodes.h | modified | +1 −0 |
| src/test/regress/expected/domain.out | modified | +4 −0 |
| src/test/regress/sql/domain.sql | modified | +3 −0 |