Re: [GENERAL] Question regarding new windowing functions in 8.4devel

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Question regarding new windowing functions in 8.4devel
Дата
Msg-id 8279.1232127274@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] Question regarding new windowing functions in 8.4devel  (David Fetter <david@fetter.org>)
Ответы Re: [GENERAL] Question regarding new windowing functions in 8.4devel  (David Fetter <david@fetter.org>)
Список pgsql-hackers
David Fetter <david@fetter.org> writes:
> I tried this:

> SELECT
>     typ,
>     ts,
>     rank() over w AS foo_rank
> FROM
>     foo
>         WINDOW  w AS (partition by typ order by ts desc)
> WHERE
>     foo_rank < 4;

> ERROR:  syntax error at or near "WHERE"
> LINE 8: WHERE
>         ^

RTFM ... WINDOW goes after WHERE (and GROUP BY, HAVING, ...)

Also, we have never allowed SELECT-alias references in WHERE;
window functions have nothing to do with that.

            regards, tom lane

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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Re: [GENERAL] Question regarding new windowing functions in 8.4devel
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: SnapshotResetXmin