MCPcopy Create free account
hub / github.com/apache/cloudberry / delete_function

Function delete_function

src/pl/plpgsql/src/pl_comp.c:2596–2605  ·  view source on GitHub ↗

* delete_function - clean up as much as possible of a stale function cache * * We can't release the PLpgSQL_function struct itself, because of the * possibility that there are fn_extra pointers to it. We can release * the subsidiary storage, but only if there are no active evaluations * in progress. Otherwise we'll just leak that storage. Since the * case would only occur if a pg_proc upd

Source from the content-addressed store, hash-verified

2594 * twice.
2595 */
2596static void
2597delete_function(PLpgSQL_function *func)
2598{
2599 /* remove function from hash table (might be done already) */
2600 plpgsql_HashTableDelete(func);
2601
2602 /* release the function's storage if safe and not done already */
2603 if (func->use_count == 0)
2604 plpgsql_free_function_memory(func);
2605}
2606
2607/* exported so we can call it from _PG_init() */
2608void

Callers 1

plpgsql_compileFunction · 0.85

Calls 2

plpgsql_HashTableDeleteFunction · 0.85

Tested by

no test coverage detected