* 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
| 2594 | * twice. |
| 2595 | */ |
| 2596 | static void |
| 2597 | delete_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() */ |
| 2608 | void |
no test coverage detected