Re: BUG #15797: Wrong Execution Plan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rodrigo(dot)garcia(at)cross-join(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15797: Wrong Execution Plan
Date: 2019-05-10 03:32:53
Message-ID: 536.1557459173@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2019-05-10 05:37:34 Re: inconsistent results querying table partitioned by date
Previous Message PG Bug reporting form 2019-05-10 01:34:03 BUG #15797: Wrong Execution Plan