mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
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
This commit is contained in:
@ -71,7 +71,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.172 2010/02/08 20:39:51 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.173 2010/02/12 17:33:19 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1999,7 +1999,7 @@ AggCheckCallContext(FunctionCallInfo fcinfo, MemoryContext *aggcontext)
|
||||
if (fcinfo->context && IsA(fcinfo->context, WindowAggState))
|
||||
{
|
||||
if (aggcontext)
|
||||
*aggcontext = ((WindowAggState *) fcinfo->context)->wincontext;
|
||||
*aggcontext = ((WindowAggState *) fcinfo->context)->aggcontext;
|
||||
return AGG_CONTEXT_WINDOW;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user