| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера