Re: Idea for aggregates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Idea for aggregates
Дата
Msg-id 20283.1396667911@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Idea for aggregates  (Greg Stark <stark@mit.edu>)
Ответы Re: Idea for aggregates  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> Well in many cases stype will just be internal for many of them. That
> doesn't mean they're the same.

> Hm, I suppose it might if they have the same sfunc.

> This is actually where I started but we concluded that we needed some
> declaration that the aggregates were actually related and would interpret
> the state the same way and not just that it happened to use the same
> storage format.

Well, in practice you'd need to also compare the input datatype (consider
polymorphic aggregates) and initcond.  But the sfunc isn't told which
finalfunc will be applied, so any aggregates that share the same sfunc and
have the other conditions the same *must* have the identical transition
data behavior.  I don't see any reason to invent new syntax, and there
are good reasons not to if we don't have to.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Idea for aggregates