| 2656 | } |
| 2657 | |
| 2658 | static void |
| 2659 | plpgsql_HashTableDelete(PLpgSQL_function *function) |
| 2660 | { |
| 2661 | plpgsql_HashEnt *hentry; |
| 2662 | |
| 2663 | /* do nothing if not in table */ |
| 2664 | if (function->fn_hashkey == NULL) |
| 2665 | return; |
| 2666 | |
| 2667 | hentry = (plpgsql_HashEnt *) hash_search(plpgsql_HashTable, |
| 2668 | (void *) function->fn_hashkey, |
| 2669 | HASH_REMOVE, |
| 2670 | NULL); |
| 2671 | if (hentry == NULL) |
| 2672 | elog(WARNING, "trying to delete function that does not exist"); |
| 2673 | |
| 2674 | /* remove back link, which no longer points to allocated storage */ |
| 2675 | function->fn_hashkey = NULL; |
| 2676 | } |
no test coverage detected