Skip to content

Commit 389dd12

Browse files
committed
Disable function check during remove function
1 parent 65716ee commit 389dd12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/commands/functioncmds.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,7 @@ RemoveFunctionById(Oid funcOid)
11241124
HeapTuple languageTuple;
11251125
Form_pg_language languageStruct;
11261126
Oid languageValidator;
1127+
bool save_check_function_bodies;
11271128

11281129
/*
11291130
* Delete the pg_proc tuple.
@@ -1141,12 +1142,15 @@ RemoveFunctionById(Oid funcOid)
11411142
* accessed temp relation or not. So validate function body
11421143
* again -- that will set MyXactAccessedTempRel.
11431144
*/
1145+
save_check_function_bodies = check_function_bodies;
1146+
check_function_bodies = false;
11441147
language_oid = ((Form_pg_proc) GETSTRUCT(tup))->prolang;
11451148
languageTuple = SearchSysCache1(LANGOID, language_oid);
11461149
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);
11471150
languageValidator = languageStruct->lanvalidator;
11481151
OidFunctionCall1(languageValidator, ObjectIdGetDatum(funcOid));
11491152
ReleaseSysCache(languageTuple);
1153+
check_function_bodies = save_check_function_bodies;
11501154

11511155
simple_heap_delete(relation, &tup->t_self);
11521156

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