Skip site navigation (1) Skip section navigation (2)

Re: DEALLOCATE ALL

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: 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:41:37
Message-ID: 20070330144137.GK4215@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-patches
Marko Kreen escribió:
> On 3/30/07, Alvaro Herrera <alvherre(at)commandprompt(dot)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.

In response to

Responses

pgsql-patches by date

Next:From: Teodor SigaevDate: 2007-03-30 16:05:17
Subject: index support is NULL
Previous:From: Marko KreenDate: 2007-03-30 14:00:29
Subject: Re: DEALLOCATE ALL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group