]> granicus.if.org Git - postgresql/commit
Extend the set of frame options supported for window functions.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Feb 2010 17:33:21 +0000 (17:33 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Feb 2010 17:33:21 +0000 (17:33 +0000)
commitec4be2ee6827b6bd85e0813c7a8993cfbb0e6fa7
treef4f98eb0f5ff45dbcd23778a1c683a1f597431b7
parenta5348fafd182d5b84c89b43af3746711ce28f319
Extend the set of frame options supported for window functions.

This patch allows the frame to start from CURRENT ROW (in either RANGE or
ROWS mode), and it also adds support for ROWS n PRECEDING and ROWS n FOLLOWING
start and end points.  (RANGE value PRECEDING/FOLLOWING isn't there yet ---
the grammar works, but that's all.)

Hitoshi Harada, reviewed by Pavel Stehule
28 files changed:
doc/src/sgml/func.sgml
doc/src/sgml/ref/select.sgml
doc/src/sgml/syntax.sgml
src/backend/executor/nodeAgg.c
src/backend/executor/nodeWindowAgg.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/setrefs.c
src/backend/optimizer/plan/subselect.c
src/backend/parser/gram.y
src/backend/parser/parse_agg.c
src/backend/parser/parse_clause.c
src/backend/utils/adt/ruleutils.c
src/include/catalog/catversion.h
src/include/nodes/execnodes.h
src/include/nodes/parsenodes.h
src/include/nodes/plannodes.h
src/include/optimizer/planmain.h
src/include/parser/kwlist.h
src/test/regress/expected/window.out
src/test/regress/parallel_schedule
src/test/regress/serial_schedule
src/test/regress/sql/window.sql