|
PostgreSQL Source Code git master
|
#include "fmgr.h"

Go to the source code of this file.
Macros | |
| #define | WINDOW_SEEK_CURRENT 0 |
| #define | WINDOW_SEEK_HEAD 1 |
| #define | WINDOW_SEEK_TAIL 2 |
| #define | PG_WINDOW_OBJECT() ((WindowObject) fcinfo->context) |
| #define | WindowObjectIsValid(winobj) ((winobj) != NULL && IsA(winobj, WindowObjectData)) |
Typedefs | |
| typedef struct WindowObjectData * | WindowObject |
Functions | |
| void | WinCheckAndInitializeNullTreatment (WindowObject winobj, bool allowNullTreatment, FunctionCallInfo fcinfo) |
| void * | WinGetPartitionLocalMemory (WindowObject winobj, Size sz) |
| int64 | WinGetCurrentPosition (WindowObject winobj) |
| int64 | WinGetPartitionRowCount (WindowObject winobj) |
| void | WinSetMarkPosition (WindowObject winobj, int64 markpos) |
| bool | WinRowsArePeers (WindowObject winobj, int64 pos1, int64 pos2) |
| Datum | WinGetFuncArgInPartition (WindowObject winobj, int argno, int relpos, int seektype, bool set_mark, bool *isnull, bool *isout) |
| Datum | WinGetFuncArgInFrame (WindowObject winobj, int argno, int relpos, int seektype, bool set_mark, bool *isnull, bool *isout) |
| Datum | WinGetFuncArgCurrent (WindowObject winobj, int argno, bool *isnull) |
| #define PG_WINDOW_OBJECT | ( | ) | ((WindowObject) fcinfo->context) |
Definition at line 41 of file windowapi.h.
| #define WINDOW_SEEK_CURRENT 0 |
Definition at line 34 of file windowapi.h.
| #define WINDOW_SEEK_HEAD 1 |
Definition at line 35 of file windowapi.h.
| #define WINDOW_SEEK_TAIL 2 |
Definition at line 36 of file windowapi.h.
| #define WindowObjectIsValid | ( | winobj | ) | ((winobj) != NULL && IsA(winobj, WindowObjectData)) |
Definition at line 43 of file windowapi.h.
Definition at line 39 of file windowapi.h.
|
extern |
Definition at line 3578 of file nodeWindowAgg.c.
References Assert, elog, ereport, errcode(), errmsg(), ERROR, fb(), FunctionCallInfoBaseData::flinfo, FmgrInfo::fn_oid, funcname, get_func_name(), WindowObjectData::ignore_nulls, IGNORE_NULLS, NO_NULLTREATMENT, PARSER_IGNORE_NULLS, and WindowObjectIsValid.
Referenced by leadlag_common(), window_cume_dist(), window_dense_rank(), window_first_value(), window_last_value(), window_nth_value(), window_ntile(), window_percent_rank(), window_rank(), and window_row_number().
|
extern |
Definition at line 3626 of file nodeWindowAgg.c.
References Assert, WindowAggState::currentpos, WindowObjectIsValid, and WindowObjectData::winstate.
Referenced by rank_up(), window_cume_dist(), window_percent_rank(), window_rank(), and window_row_number().
|
extern |
Definition at line 4117 of file nodeWindowAgg.c.
References WindowObjectData::argstates, Assert, ExprContext::ecxt_outertuple, ExecEvalExpr(), fb(), list_nth(), ScanState::ps, PlanState::ps_ExprContext, WindowAggState::ss, ScanState::ss_ScanTupleSlot, WindowObjectIsValid, and WindowObjectData::winstate.
Referenced by leadlag_common(), window_nth_value(), and window_ntile().
|
extern |
Definition at line 3918 of file nodeWindowAgg.c.
References WindowObjectData::argstates, Assert, WindowAggState::currentpos, ExprContext::ecxt_outertuple, elog, ERROR, ExecEvalExpr(), fb(), WindowAggState::frameheadpos, FRAMEOPTION_EXCLUDE_CURRENT_ROW, FRAMEOPTION_EXCLUDE_GROUP, FRAMEOPTION_EXCLUDE_TIES, FRAMEOPTION_EXCLUSION, WindowAggState::frameOptions, WindowAggState::frametailpos, WindowAggState::groupheadpos, WindowAggState::grouptailpos, WindowObjectData::ignore_nulls, IGNORE_NULLS, ignorenulls_getfuncarginframe(), list_nth(), Max, Min, ScanState::ps, PlanState::ps_ExprContext, row_is_in_frame(), WindowAggState::ss, WindowAggState::temp_slot_1, update_frameheadpos(), update_frametailpos(), update_grouptailpos(), window_gettupleslot(), WINDOW_SEEK_CURRENT, WINDOW_SEEK_HEAD, WINDOW_SEEK_TAIL, WindowObjectIsValid, WinSetMarkPosition(), and WindowObjectData::winstate.
Referenced by window_first_value(), window_last_value(), and window_nth_value().
|
extern |
Definition at line 3751 of file nodeWindowAgg.c.
References Assert, WindowAggState::currentpos, elog, ERROR, fb(), get_notnull_info(), gettuple_eval_partition(), WindowObjectData::ignore_nulls, IGNORE_NULLS, NN_NOTNULL, NN_NULL, put_notnull_info(), spool_tuples(), WindowAggState::spooled_rows, WINDOW_SEEK_CURRENT, WINDOW_SEEK_HEAD, WINDOW_SEEK_TAIL, WindowObjectIsValid, WinSetMarkPosition(), and WindowObjectData::winstate.
Referenced by leadlag_common().
|
extern |
Definition at line 3611 of file nodeWindowAgg.c.
References Assert, fb(), WindowObjectData::localmem, MemoryContextAllocZero(), WindowAggState::partcontext, WindowObjectIsValid, and WindowObjectData::winstate.
Referenced by rank_up(), window_cume_dist(), window_dense_rank(), window_ntile(), window_percent_rank(), and window_rank().
|
extern |
Definition at line 3641 of file nodeWindowAgg.c.
References Assert, spool_tuples(), WindowAggState::spooled_rows, WindowObjectIsValid, and WindowObjectData::winstate.
Referenced by window_cume_dist(), window_ntile(), and window_percent_rank().
|
extern |
Definition at line 3694 of file nodeWindowAgg.c.
References are_peers(), Assert, elog, ERROR, ExecClearTuple(), fb(), INT64_FORMAT, WindowAgg::ordNumCols, PlanState::plan, ScanState::ps, WindowAggState::ss, WindowAggState::temp_slot_1, WindowAggState::temp_slot_2, window_gettupleslot(), WindowObjectIsValid, and WindowObjectData::winstate.
Referenced by rank_up(), and window_cume_dist().
|
extern |
Definition at line 3659 of file nodeWindowAgg.c.
References Assert, WindowAggState::buffer, elog, ERROR, fb(), WindowObjectData::markpos, WindowObjectData::markptr, WindowObjectData::readptr, WindowObjectData::seekpos, tuplestore_select_read_pointer(), tuplestore_skiptuples(), WindowObjectIsValid, and WindowObjectData::winstate.
Referenced by eval_windowaggregates(), ignorenulls_getfuncarginframe(), rank_up(), window_row_number(), WinGetFuncArgInFrame(), and WinGetFuncArgInPartition().