Re: Windowing functions vs aggregates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Windowing functions vs aggregates
Дата
Msg-id 9062.1239716153@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Windowing functions vs aggregates  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
Teodor Sigaev <teodor@sigaev.ru> writes:
> Cast of aggregate's type works:
> # select avg(s)::int4 from foo;

> but that doesn't work for with new windowing functions interface:
> # select avg(s)::int4 OVER () from foo;
> ERROR:  syntax error at or near "OVER"
> LINE 1: select avg(s)::int4 OVER () from foo;

> Is that intentional?

You would need to put the cast around the whole "foo() over ()"
construct.  That's not a divisible unit.
        regards, tom lane


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

Предыдущее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: Why isn't stats_temp_directory automatically created?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Windowing functions vs aggregates