On Sun, May 25, 2014 at 2:10 PM, Thomas Mayer <thomas.ma...@student.kit.edu>
wrote:

> Hello David,
>
> sorry for the late response. I will try out your changes from the view of
> a user in mid-June. However, I can't do a trustworthy code review as I'm
> not an experienced postgre-hacker (yet).
>
>
Thanks, that sort of review will be a great start.

I've attached an updated patch as it seems there's been a change that
removes redundant sorts which was breaking one of the regression tests in
v0.2 of the patch.

+EXPLAIN (COSTS OFF)
+SELECT depname,depsalary FROM (SELECT depname,
+                      sum(salary) OVER (PARTITION BY depname) depsalary,
+                      rank() OVER (ORDER BY enroll_date) emprank
+  FROM empsalary) emp
+WHERE depname = 'sales';

This used to produced a plan which included a sort by enroll_date, but this
is no longer the case. I've updated the expected results to remove the
extra sort from the explain output

Regards

David Rowley

Attachment: wfunc_pushdown_partitionby_v0.3.patch
Description: Binary data

-- 
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