Re: review: More frame options in window functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: review: More frame options in window functions
Дата
Msg-id 29040.1265661802@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: review: More frame options in window functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> I started looking at this patch.  I believe that we should commit the 
> AggGetMemoryContext API function --- *not* the window context
> management changes that you included here, but only the API abstraction
> --- to be sure that that gets into 9.0 so that third-party aggregate
> functions can start relying on it instead of looking directly at the
> AggState or WindowAggState node.  The rest of the patch might or might
> not make it, but we can at least help people future-proof their code.

I have committed that little part.  I revised the function API to be

/* AggCheckCallContext can return one of the following codes, or 0: */
#define AGG_CONTEXT_AGGREGATE    1            /* regular aggregate */
#define AGG_CONTEXT_WINDOW       2            /* window function */

extern int  AggCheckCallContext(FunctionCallInfo fcinfo,                               MemoryContext *aggcontext);

so that it would be conveniently usable in places that just want to
check aggregate-ness and don't need to fetch a memory context; and
with the thought that maybe someday there would be more than two
possible call contexts.
        regards, tom lane


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

Предыдущее
От: Tim Bunce
Дата:
Сообщение: Re: Add on_plperl_init and on_plperlu_init to plperl UPDATE 3 [PATCH]
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Writeable CTEs patch