Re: dynahash API questions

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: dynahash API questions
Дата
Msg-id 1164437790.23622.254.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: dynahash API questions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, 2006-11-25 at 01:36 -0500, Tom Lane wrote:
> 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

Ah, fair enough -- that should work.

> (Right offhand it sounds like you might be reinventing execGrouping.c
> --- what is your application exactly?)

I'm playing around with writing a memoization facility as a UDF:
cache(f, a1, a2, ...) = f(a1, a2, ...), except that cache() keeps an
internal hash of f()'s return values and uses that to avoid calling f()
when possible. Hence the need for a hash table whose keys are (a1,
a2, ...).

-Neil




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: dynahash API questions
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: First Release Candidate Uploaded ...