Using a pointer as statetype for an aggregate

Поиск
Список
Период
Сортировка
От Florian G. Pflug
Тема Using a pointer as statetype for an aggregate
Дата
Msg-id 44572D07.6090307@phlo.org
обсуждение исходный текст
Ответы Re: Using a pointer as statetype for an aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi

I've now completed my implementation of a collect_distinct aggregate, and
it seems to work. My statetype is basically a pointer to a hashtable (allocated
from the aggcontext). Since using internal as statetype is unsupported,
I use int8, and just cast my pointer back and forth from int8.

It appears to work on both my dev (32bit) and my production (64bit) machine,
and it doesn't crash even when used heavily. Is there some drawback to my
approach? If not - why doesn't postgres allow "internal" as statetype?

greetings, Florian Pflug

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

Предыдущее
От: Csaba Nagy
Дата:
Сообщение: Re: Alternative for vacuuming queue-like tables
Следующее
От: Markus Schiltknecht
Дата:
Сообщение: Unnecessary function calls