PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> Theres is a difference of the plan generated just only by putting the
> filters inside a inner query or outside a inner query.
You do realize that moving that WHERE clause changes the semantics
of the window functions? The planner can't freely change the
filter location from one to the other.
regards, tom lane