Neil Conway <neilc@samurai.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