Re: DEALLOCATE ALL
От | Marko Kreen |
---|---|
Тема | Re: DEALLOCATE ALL |
Дата | |
Msg-id | e51f66da0703300700r7852653w662b9fb90a871b3@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: DEALLOCATE ALL (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: DEALLOCATE ALL
|
Список | pgsql-patches |
On 3/30/07, Alvaro Herrera <alvherre@commandprompt.com> wrote: > If by destruction you mean something different than pfree, then maybe > hash_remove in a loop is the best solution, the other idea being passing > a function pointer to hash_destroy_deep to call on each element, which > is probably too messy an API. Yes, callback function is needed, either in HASHCTL or as argument to deep_free(). > In any case it's not likely that there are going to be thousands of > prepared statements, so is this really an issue? I think the issue is here that its very common thing to do, so open-coding it everywhere is waste, there should be some utility function for that. void hash_foreach(HTAB, void (*cb_func)(void *)); -- marko
В списке pgsql-patches по дате отправления: