Hi,
I was looking at commit aca992040951c7665f1701cd25d48808eda7a809
I think the check of msg after the switch statement is not necessary. The variable msg is used afterward.
If there is (potential) missing case in switch statement, the compiler would warn.
How about removing the check ?
Thanks
diff --git a/src/backend/commands/dropcmds.c b/src/backend/commands/dropcmds.c
index db906f530e..55996940eb 100644
--- a/src/backend/commands/dropcmds.c
+++ b/src/backend/commands/dropcmds.c
@@ -518,9 +518,6 @@ does_not_exist_skipping(ObjectType objtype, Node *object)
/* no default, to let compiler warn about missing case */
}
- if (!msg)
- elog(ERROR, "unrecognized object type: %d", (int) objtype);
-
if (!args)
ereport(NOTICE, (errmsg(msg, name)));
else