Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]
Дата
Msg-id 1430cb03838fb80e461b72461789ef74@news-out.riddles.org.uk
обсуждение исходный текст
Ответ на Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
Noah Misch said:

> I twitched upon reading this, because neither ORDER BY nor FILTER preclude
> the aggregate being MIN or MAX.  Perhaps Andrew can explain why he put
> aggorder there back in 2009.

The bottom line is that I intentionally avoided assuming that an agg with an
aggsortop could only be min() or max() and that having an order by clause
would always be harmless in such cases. I can't think of an actual use case
where it would matter, but I've seen people define some pretty strange aggs
recently.

So I mildly object to simply throwing away the ORDER BY clause in such cases.

-- 
Andrew (irc:RhodiumToad)



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

Предыдущее
От: Nicholas White
Дата:
Сообщение: Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: [PATCH] pgbench --throttle (submission 7 - with lag measurement)