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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy