aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlogutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-09-13 11:31:40 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-09-13 11:32:25 -0400
commita20993608a65b9896b4c05cb7061bc60d6f1840a (patch)
treece1d91f8b25a661bd28ef85f19648f0bbd3a9c27 /src/backend/access/transam/xlogutils.c
parent6b896f511f8dbeac9f09cc54c6cb62bdff25e501 (diff)
downloadpostgresql-a20993608a65b9896b4c05cb7061bc60d6f1840a.tar.gz
postgresql-a20993608a65b9896b4c05cb7061bc60d6f1840a.zip
Fix case of window function + aggregate + GROUP BY expression.
In commit 1bc16a946008a7cbb33a9a06a7c6765a807d7f59 I added a minor optimization to drop the component variables of a GROUP BY expression from the target list computed at the aggregation level of a query, if those Vars weren't referenced elsewhere in the tlist. However, I overlooked that the window-function planning code would deconstruct such expressions and thus need to have access to their component variables. Fix it to not do that. While at it, I removed the distinction between volatile and nonvolatile window partition/order expressions: the code now computes all of them at the aggregation level. This saves a relatively expensive check for volatility, and it's unclear that the resulting plan isn't better anyway. Per bug #7535 from Louis-David Mitterrand. Back-patch to 9.2.
Diffstat (limited to 'src/backend/access/transam/xlogutils.c')
0 files changed, 0 insertions, 0 deletions