| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | David Rowley <dgrowley(at)gmail(dot)com> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, thomas(dot)mayer(at)student(dot)kit(dot)edu |
| Subject: | Re: Window function optimisation, allow pushdowns of items matching PARTITION BY clauses |
| Date: | 2014-04-13 15:31:41 |
| Message-ID: | 32204.1397403101@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
David Rowley <dgrowley(at)gmail(dot)com> writes:
> On this thread
> http://www.postgresql.org/message-id/52C6F712.6040804@student.kit.edu there
> was some discussion around allowing push downs of quals that happen to be
> in every window clause of the sub query. I've quickly put together a patch
> which does this (see attached)
I think you should have check_output_expressions deal with this, instead.
Compare the existing test there for non-DISTINCT output columns.
> Oh and I know that my function var_exists_in_all_query_partition_by_clauses
> has no business in allpaths.c, I'll move it out as soon as I find a better
> home for it.
I might be wrong, but I think you could just embed that search loop in
check_output_expressions, and it wouldn't be too ugly.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2014-04-13 15:44:39 | Re: Signaling of waiting for a cleanup lock? |
| Previous Message | Tom Lane | 2014-04-13 15:01:35 | Re: Patch to fix a couple of compiler warnings from 80a5cf64 |