Re: DEALLOCATE ALL - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: DEALLOCATE ALL
Date
Msg-id 20070330144137.GK4215@alvh.no-ip.org
Whole thread Raw
In response to Re: DEALLOCATE ALL  ("Marko Kreen" <markokr@gmail.com>)
Responses Re: DEALLOCATE ALL  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-patches
Marko Kreen escribió:
> On 3/30/07, Alvaro Herrera <alvherre@commandprompt.com> wrote:

> >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 *));

Extra points if you can implement a map() function for hashes ;-) (I
think it's called "mutator" in our sources for other kind of stuff)

I think it would be
void *hash_map(HTAB, void *(*map_func) (void *))

Not sure what the return value would be though :-( (Maybe this is
extra complication enough that it's not worth the hassle)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-patches by date:

Previous
From: "Marko Kreen"
Date:
Subject: Re: DEALLOCATE ALL
Next
From: Teodor Sigaev
Date:
Subject: index support is NULL