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

2009-01-16 Thread David Fetter
On Fri, Jan 16, 2009 at 12:34:34PM -0500, Tom Lane wrote: David Fetter da...@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

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

2009-01-16 Thread Tom Lane
David Fetter da...@fetter.org writes: We don't appear to be able to use the actual thing in the target list either. Would you translate that into English? Or at least an example without trivial syntax errors? regards, tom lane -- Sent via pgsql-general mailing list

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

2009-01-16 Thread David Fetter
On Fri, Jan 16, 2009 at 12:41:59PM -0500, Tom Lane wrote: David Fetter da...@fetter.org writes: We don't appear to be able to use the actual thing in the target list either. Would you translate that into English? Or at least an example without trivial syntax errors? This works: SELECT

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

2009-01-16 Thread Tom Lane
David Fetter da...@fetter.org writes: Basically, there is no way I've found so far to qualify any window function in the target list, which makes a giant POLA violation. The FM points out in at least two places that window functions logically execute on the output of the WHERE/GROUP BY/HAVING