On 3/30/07, Alvaro Herrera <[EMAIL PROTECTED]> 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
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match