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: 2006-11-25 06:36:58
Message-ID: 3145.1164436618@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2006-11-25 06:46:30 First Release Candidate Uploaded ...
Previous Message Mark Kirkwood 2006-11-25 05:57:51 Re: [PATCHES] Avg performance for int8/numeric