From 1d751018d881f415a61787424d900ae8a7126da3 Mon Sep 17 00:00:00 2001 From: Robert Haas <rhaas@postgresql.org> Date: Wed, 19 Oct 2011 23:45:31 -0400 Subject: [PATCH] Add "skipping" to the NOTICE produced by DROP OPERATOR CLASS IF EXISTS. This makes this message consistent with all the other similar notices produced by other DROP IF EXISTS commands. Noted by KaiGai Kohei --- src/backend/commands/opclasscmds.c | 2 +- src/test/regress/expected/drop_if_exists.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index 3dbc9329267..5dde78abc9a 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -1564,7 +1564,7 @@ RemoveOpClass(RemoveOpClassStmt *stmt) if (!HeapTupleIsValid(tuple)) { ereport(NOTICE, - (errmsg("operator class \"%s\" does not exist for access method \"%s\"", + (errmsg("operator class \"%s\" does not exist for access method \"%s\", skipping", NameListToString(stmt->opclassname), stmt->amname))); return; } diff --git a/src/test/regress/expected/drop_if_exists.out b/src/test/regress/expected/drop_if_exists.out index dab73aaba60..d29077657f7 100644 --- a/src/test/regress/expected/drop_if_exists.out +++ b/src/test/regress/expected/drop_if_exists.out @@ -205,7 +205,7 @@ NOTICE: server "test_server_exists" does not exist, skipping DROP OPERATOR CLASS test_operator_class USING btree; ERROR: operator class "test_operator_class" does not exist for access method "btree" DROP OPERATOR CLASS IF EXISTS test_operator_class USING btree; -NOTICE: operator class "test_operator_class" does not exist for access method "btree" +NOTICE: operator class "test_operator_class" does not exist for access method "btree", skipping DROP OPERATOR CLASS test_operator_class USING no_such_am; ERROR: access method "no_such_am" does not exist DROP OPERATOR CLASS IF EXISTS test_operator_class USING no_such_am; -- GitLab