Re: dynahash API questions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: dynahash API questions
Date
Msg-id 3145.1164436618@sss.pgh.pa.us
Whole thread Raw
In response to dynahash API questions  (Neil Conway <neilc@samurai.com>)
Responses Re: dynahash API questions
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: dynahash API questions
Next
From: Neil Conway
Date:
Subject: Re: dynahash API questions