"Pavel Stehule" <pavel.steh...@gmail.com> writes:
> wrong
> postgres=# select a, b, sum(a) over (w) from foo window w as
> (partition by b order by a ROWS BETWEEN UNBOUNDED PRECEDING AND
> UNBOUNDED FOLLOWING);

Should be "over w".  "over (w)" is a <window specification> that
modifies an existing window, not just a reference, and in particular
that means we don't copy the framing clause; see SQL2008 7.11
general rule 1) b) i) 6).

Hmm... I think 7.11 syntax rule 10) e) actually wants us to throw an
error for this case, not just silently ignore the referenced window's
framing clause.  I had thought that was just being overly anal, but now
it seems that this case can result in user confusion, so maybe we'd
better throw the error after all.

                        regards, tom lane

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

Reply via email to