mirror of
https://github.com/postgres/postgres.git
synced 2026-01-26 09:41:40 +03:00
Remove useless asserts in report_namespace_conflict()
An assertion is used in this routine to check that a valid namespace OID
is given by the caller, but it was repeated twice: once at the top of
the routine and a second time multiple times in a switch/case. This
commit removes the assertions within the switch/case.
Thinko in commit 765cbfdc92.
Author: Man Zeng <zengman@halodbtech.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Discussion: https://postgr.es/m/tencent_40F8C1D82E2EE28065009AAA@qq.com
This commit is contained in:
@@ -117,27 +117,21 @@ report_namespace_conflict(Oid classId, const char *name, Oid nspOid)
|
||||
switch (classId)
|
||||
{
|
||||
case ConversionRelationId:
|
||||
Assert(OidIsValid(nspOid));
|
||||
msgfmt = gettext_noop("conversion \"%s\" already exists in schema \"%s\"");
|
||||
break;
|
||||
case StatisticExtRelationId:
|
||||
Assert(OidIsValid(nspOid));
|
||||
msgfmt = gettext_noop("statistics object \"%s\" already exists in schema \"%s\"");
|
||||
break;
|
||||
case TSParserRelationId:
|
||||
Assert(OidIsValid(nspOid));
|
||||
msgfmt = gettext_noop("text search parser \"%s\" already exists in schema \"%s\"");
|
||||
break;
|
||||
case TSDictionaryRelationId:
|
||||
Assert(OidIsValid(nspOid));
|
||||
msgfmt = gettext_noop("text search dictionary \"%s\" already exists in schema \"%s\"");
|
||||
break;
|
||||
case TSTemplateRelationId:
|
||||
Assert(OidIsValid(nspOid));
|
||||
msgfmt = gettext_noop("text search template \"%s\" already exists in schema \"%s\"");
|
||||
break;
|
||||
case TSConfigRelationId:
|
||||
Assert(OidIsValid(nspOid));
|
||||
msgfmt = gettext_noop("text search configuration \"%s\" already exists in schema \"%s\"");
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user