| From: | Antonin Houska <ah(at)cybertec(dot)at> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Accidental use of the PVC_RECURSE_WINDOWFUNCS flag? |
| Date: | 2020-04-29 14:45:20 |
| Message-ID: | 31465.1588171520@antos |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I think that the PVC_RECURSE_WINDOWFUNCS flag shouldn't be used in
make_partial_grouping_target().
First, this function uses the grouping_target (see grouping_planner()) as the
input, and that should only contain the input expressions of window functions
as opposed to the window functions themselves. (make_window_input_target() is
responsible for pulling the input expressions from the window functions.)
Second, if a window function appeared in the result of
make_partial_grouping_target() for any reason, the Agg node would fail to
evaluate it. Am I wrong?
--
Antonin Houska
Web: https://www.cybertec-postgresql.com
| Attachment | Content-Type | Size |
|---|---|---|
| remove_PVC_RECURSE_WINDOWFUNCS.diff | text/x-diff | 530 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Vondra | 2020-04-29 15:17:35 | Re: Binary search in ScalarArrayOpExpr for OR'd constant arrays |
| Previous Message | Jonah H. Harris | 2020-04-29 14:33:46 | Re: Proposing WITH ITERATIVE |