speaking of CREATE AGGREGATE ...

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема speaking of CREATE AGGREGATE ...
Дата
Msg-id 5FB5C78C.5020305@anastigmatix.net
обсуждение исходный текст
Список pgsql-hackers
I saw in the docs for CREATE AGGREGATE, under argmode, "Aggregate functions
do not support OUT arguments".

And because I tend to poke things I'm told not to poke, I thought "but
wait, the CREATE AGGREGATE doesn't have much to say about the return type
anyway, that's just the FINALFUNC's return type." And I made an aggregate
with a finalfunc that has OUT parameters, and lo, it works, and a record
is returned with the expected aggregate results.

The only flaw seems to be that the result can't be accessed by field,
because its tupledesc isn't known. I /suspect/ (haven't chased it down
though) that the finalfunc produces a blessed tupledesc for its result,
but the identifying typmod is not propagated along to the aggregate result.

Does that sound close? Would it possibly be that simple to make such
aggregates usable? Or is there a larger can of worms I'm overlooking?

Regards,
-Chap



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

Предыдущее
От: Vik Fearing
Дата:
Сообщение: Re: CREATE AGGREGATE array_cat
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CREATE AGGREGATE array_cat