Re: Window-functions patch handling of aggregates

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Window-functions patch handling of aggregates
Дата
Msg-id 162867790812250502j94a1258g5a2baa0ba5566767@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Window-functions patch handling of aggregates  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
Ответы Re: Window-functions patch handling of aggregates  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
Список pgsql-hackers
2008/12/25 Hitoshi Harada <umi.tanuki@gmail.com>:
> 2008/12/25 Greg Stark <greg.stark@enterprisedb.com>:
>> Yeah, it seems like adding a flag like iswindowable to aggregate functions
>> is the safest option.
>>
>> It would be nice if it represented an abstract property of the state
>> function or final function rather than just "works with the implementation
>> of window functions". I'm not sure what that property is though -
>> isidempotent? isreentrant? Maybe just  a vague isrepeatable?
>
> No, I meant wrinting such like:
>
> Datum
> some_trans_fn(PG_FUNCTION_ARGS)
> {
>  if (fcinfo->context && IsA(fcinfo->context, WindowAggState))
>    elog(ERROR, "some_agg does not support window aggregate");
>
> ...
> }
>
> rather than adding column to catalog. To add flag you must add new
> syntax for CREATE AGGREGATE, which is slightly more painful.
>

enhancing of CREATE AGGREGATE syntax should be better, it could solve
problem with compatibility.

regards
Pavel Stehule

> Regards,
>
> --
> Hitoshi Harada
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>


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

Предыдущее
От: KaiGai Kohei
Дата:
Сообщение: Updates of SE-PostgreSQL 8.4devel patches (r1348)
Следующее
От: "Hitoshi Harada"
Дата:
Сообщение: Re: Window-functions patch handling of aggregates