Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7d9f379

Browse files
committed
Don't call language valdiator function if it doesn't exists for given language, because validator is optional feature of the procedural language
1 parent 7669343 commit 7d9f379

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/commands/functioncmds.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,10 @@ RemoveFunctionById(Oid funcOid)
11481148
languageTuple = SearchSysCache1(LANGOID, language_oid);
11491149
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);
11501150
languageValidator = languageStruct->lanvalidator;
1151-
OidFunctionCall1(languageValidator, ObjectIdGetDatum(funcOid));
1151+
if OidIsValid(languageValidator) {
1152+
/* Language validator is optional feature of language */
1153+
OidFunctionCall1(languageValidator, ObjectIdGetDatum(funcOid));
1154+
}
11521155
ReleaseSysCache(languageTuple);
11531156
check_function_bodies = save_check_function_bodies;
11541157

0 commit comments

Comments
 (0)