Re: dynahash API questions
- From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- To: Neil Conway <neilc(at)samurai(dot)com>
- Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
- Subject: Re: dynahash API questions
- Date: Sat, 25 Nov 2006 01:36:58 -0500
- Message-id: <3145(dot)1164436618(at)sss(dot)pgh(dot)pa(dot)us>
Neil Conway <neilc(at)samurai(dot)com> writes:
> ... This works, but obviously it's pretty ugly. However, the
> simple solution of adding a void pointer argument to these function
> pointers would uglify all the existing hashing and comparison functions.
> Does anyone have any ideas for a better solution?
The solution that's been used so far is a static variable known to
the caller and the hash/comparison functions; see for instance
CurTupleHashTable in executor/execGrouping.c. At some point there
might be enough of these to justify adding a void pointer argument
... not sure that we're there yet though.
(Right offhand it sounds like you might be reinventing execGrouping.c
--- what is your application exactly?)
regards, tom lane
Home |
Main Index |
Thread Index