Search Postgresql Archives

Re: Question regarding new windowing functions in 8.4devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Fetter <david@xxxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux