From: | "Marko Kreen" <markokr(at)gmail(dot)com> |
---|---|
To: | "Marko Kreen" <markokr(at)gmail(dot)com>, "Neil Conway" <neilc(at)samurai(dot)com>, PGSQL-Patches <pgsql-patches(at)postgresql(dot)org>, "Andrzej Rusin" <Andrzej(dot)Rusin(at)interia(dot)pl> |
Subject: | Re: DEALLOCATE ALL |
Date: | 2007-03-30 14:00:29 |
Message-ID: | e51f66da0703300700r7852653w662b9fb90a871b3@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On 3/30/07, Alvaro Herrera <alvherre(at)commandprompt(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-03-30 14:41:37 | Re: DEALLOCATE ALL |
Previous Message | Alvaro Herrera | 2007-03-30 13:44:28 | Re: DEALLOCATE ALL |